airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [21/23] airavata git commit: Fixed AIRAVATA-1495.
Date Fri, 07 Nov 2014 00:11:36 GMT
Fixed AIRAVATA-1495.

Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/f7c25ca5
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/f7c25ca5
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/f7c25ca5

Branch: refs/heads/gfac_appcatalog_int
Commit: f7c25ca51f261786318a7ea96af29b16bb62bdc1
Parents: 9e6f748
Author: raminder <ramifnu@indiana.edu>
Authored: Thu Nov 6 15:29:35 2014 -0500
Committer: raminder <ramifnu@indiana.edu>
Committed: Thu Nov 6 15:29:35 2014 -0500

----------------------------------------------------------------------
 .../api/server/listener/AiravataExperimentStatusUpdator.java  | 7 ++++++-
 .../airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java | 6 +++---
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f7c25ca5/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
index 31dfb3a..1efa506 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/listener/AiravataExperimentStatusUpdator.java
@@ -60,13 +60,19 @@ public class AiravataExperimentStatusUpdator implements AbstractActivityListener
     public void setupExperimentStatus(WorkflowNodeStatusChangeEvent nodeStatus) throws Exception{
 		try {
 			boolean updateExperimentStatus=true;
+			ExecutionType executionType = DataModelUtils.getExecutionType((Experiment) airavataRegistry.get(RegistryModelType.EXPERIMENT,
nodeStatus.getWorkflowNodeIdentity().getExperimentId()));
+			
 	        ExperimentState state = ExperimentState.UNKNOWN;
 	        switch (nodeStatus.getState()) {
 	            case CANCELED:
 	                state = ExperimentState.CANCELED; updateExperimentStatus = true;
 	                break;
 	            case COMPLETED:
+	            	if(executionType.equals(ExecutionType.SINGLE_APP)){
+	            		state = ExperimentState.COMPLETED; updateExperimentStatus = true;
+	            	}else{
 	                state = ExperimentState.EXECUTING; updateExperimentStatus = true;
+	                }
 	                break;
 	            case INVOKED:
 	                state = ExperimentState.LAUNCHED; updateExperimentStatus = false;
@@ -84,7 +90,6 @@ public class AiravataExperimentStatusUpdator implements AbstractActivityListener
 	                return;
 	        }
 	        if (!updateExperimentStatus){
-				ExecutionType executionType = DataModelUtils.getExecutionType((Experiment) airavataRegistry.get(RegistryModelType.EXPERIMENT,
nodeStatus.getWorkflowNodeIdentity().getExperimentId()));
 				updateExperimentStatus=(executionType==ExecutionType.SINGLE_APP);
 	        }
 			updateExperimentStatus(nodeStatus.getWorkflowNodeIdentity().getExperimentId(), state);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f7c25ca5/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
index 952b30e..5973c0a 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -249,9 +249,6 @@ public class HPCPullMonitor extends PullMonitor {
                         iMonitorID.setStatus(jobStatuses.get(iMonitorID.getJobID()+","+iMonitorID.getJobName()));
   //IMPORTANT this is not a simple setter we have a logic
                         iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
                         sendNotification(iMonitorID);
-                        logger.debugId(jobStatus.getJobIdentity().getJobId(), "Published
job status change request, " +
-                                        "experiment {} , task {}", jobStatus.getJobIdentity().getExperimentId(),
-                                jobStatus.getJobIdentity().getTaskId());
                         // if the job is completed we do not have to put the job to the queue
again
                         iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
                     }
@@ -359,6 +356,9 @@ public class HPCPullMonitor extends PullMonitor {
         jobStatus.setJobIdentity(jobIdentity);
         jobStatus.setState(iMonitorID.getStatus());
         // we have this JobStatus class to handle amqp monitoring
+        logger.debugId(jobStatus.getJobIdentity().getJobId(), "Published job status change
request, " +
+                "experiment {} , task {}", jobStatus.getJobIdentity().getExperimentId(),
+        jobStatus.getJobIdentity().getTaskId());
 
         publisher.publish(jobStatus);
     }


Mime
View raw message