airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: set status update time
Date Fri, 10 Jul 2015 14:54:49 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 96480424d -> 541382600


set status update time


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

Branch: refs/heads/master
Commit: 5413826005c7d28e302633d1ceaa67b5d359ff1f
Parents: 9648042
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Fri Jul 10 10:54:44 2015 -0400
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Fri Jul 10 10:54:44 2015 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/airavata/gfac/core/GFacUtils.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/54138260/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index 05985d7..6dd8548 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -21,6 +21,7 @@
 package org.apache.airavata.gfac.core;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.AiravataZKUtils;
 import org.apache.airavata.common.utils.DBUtil;
 import org.apache.airavata.common.utils.ServerSettings;
@@ -241,6 +242,7 @@ public class GFacUtils {
             JobStatus status = new JobStatus();
             status.setJobState(state);
             jobModel.setJobStatus(status);
+            status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
             experimentCatalog.add(ExpCatChildDataType.JOB_STATUS, status, jobModel.getJobId());
             JobIdentifier identifier = new JobIdentifier(jobModel.getJobId(), taskContext.getTaskModel().getTaskId(),
                     processContext.getProcessId(), processContext.getProcessModel().getExperimentId(),
@@ -262,6 +264,7 @@ public class GFacUtils {
             TaskStatus status = new TaskStatus();
             status.setState(state);
             taskContext.getTaskModel().setTaskStatus(status);
+            status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
             experimentCatalog.add(ExpCatChildDataType.TASK_STATUS, status, taskContext.getTaskModel().getTaskId());
             TaskIdentifier identifier = new TaskIdentifier(taskContext.getTaskModel().getTaskId(),
                     processContext.getProcessId(), processContext.getProcessModel().getExperimentId(),
@@ -282,6 +285,7 @@ public class GFacUtils {
             ProcessStatus status = new ProcessStatus();
             status.setState(state);
             processContext.getProcessModel().setProcessStatus(status);
+            status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
             experimentCatalog.add(ExpCatChildDataType.PROCESS_STATUS, status, processContext.getProcessId());
             ProcessIdentifier identifier = new ProcessIdentifier(processContext.getProcessId(),
                                                                  processContext.getProcessModel().getExperimentId(),
@@ -301,7 +305,7 @@ public class GFacUtils {
             ExperimentCatalog experimentCatalog = processContext.getExperimentCatalog();
             ExperimentStatus status = new ExperimentStatus();
             status.setState(state);
-
+            status.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
             experimentCatalog.add(ExpCatChildDataType.EXPERIMENT_STATUS, status, processContext.getProcessModel().getExperimentId());
             ExperimentStatusChangeEvent experimentStatusChangeEvent = new ExperimentStatusChangeEvent(state,
processContext.getProcessModel().getExperimentId(), processContext.getGatewayId());
             processContext.getLocalEventPublisher().publish(experimentStatusChangeEvent);


Mime
View raw message