airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: fixing status issue for experiment
Date Wed, 13 Jan 2016 19:29:43 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 066473649 -> 1a30d7f08


fixing status issue for experiment


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

Branch: refs/heads/develop
Commit: 1a30d7f088ff0f31fcab2219fef1f0c9d03a62c0
Parents: 0664736
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Wed Jan 13 14:26:07 2016 -0500
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Wed Jan 13 14:26:07 2016 -0500

----------------------------------------------------------------------
 .../core/experiment/catalog/resources/ExperimentResource.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/1a30d7f0/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
index a209a56..17dfd55 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ExperimentResource.java
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.registry.core.experiment.catalog.resources;
 
+import org.apache.airavata.model.status.ExperimentState;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -573,7 +574,9 @@ public class ExperimentResource extends AbstractExpCatResource {
                 Timestamp timeOfStateChange = experimentStatusResources.get(i).getTimeOfStateChange();
                 if (timeOfStateChange != null) {
                     if (timeOfStateChange.after(max.getTimeOfStateChange())
-                            || timeOfStateChange.equals(max.getTimeOfStateChange())) {
+                            || (timeOfStateChange.equals(max.getTimeOfStateChange()) &&
experimentStatusResources.get(i).getState().equals(ExperimentState.COMPLETED.toString()))
+                            || (timeOfStateChange.equals(max.getTimeOfStateChange()) &&
experimentStatusResources.get(i).getState().equals(ExperimentState.FAILED.toString()))
+                            || (timeOfStateChange.equals(max.getTimeOfStateChange()) &&
experimentStatusResources.get(i).getState().equals(ExperimentState.CANCELED.toString()))){
                         max = experimentStatusResources.get(i);
                     }
                 }


Mime
View raw message