Package org.apache.airavata.model.workspace.experiment

Examples of org.apache.airavata.model.workspace.experiment.TaskState


        }
    }

    @Subscribe
    public void setupTaskStatus(JobStatusChangeRequest jobStatus){
      TaskState state=TaskState.UNKNOWN;
      switch(jobStatus.getState()){
      case ACTIVE:
        state=TaskState.EXECUTING; break;
      case CANCELED:
        state=TaskState.CANCELED; break;
      case COMPLETE:
        state=TaskState.COMPLETED; break;
      case FAILED:
        state=TaskState.FAILED; break;
      case HELD: case SUSPENDED: case QUEUED:
        state=TaskState.WAITING; break;
      case SETUP:
        state=TaskState.PRE_PROCESSING; break;
      case SUBMITTED:
        state=TaskState.STARTED; break;
      case UN_SUBMITTED:
        state=TaskState.CANCELED; break;
      case CANCELING:
        state=TaskState.CANCELING; break;
    default:
      break;
      }
      logger.debug("Publishing Task Status "+state.toString());
      monitorPublisher.publish(new TaskStatusChangeRequest(jobStatus.getIdentity(),state));
    }
View Full Code Here


        this.airavataRegistry = airavataRegistry;
    }

    @Subscribe
    public void updateRegistry(TaskStatusChangeRequest taskStatus) {
        TaskState state = taskStatus.getState();
        if (state != null) {
            try {
                String taskID = taskStatus.getIdentity().getTaskId();
                updateTaskStatus(taskID, state);
            } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.model.workspace.experiment.TaskState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.