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 AIRAVATA-1630
Date Fri, 13 Mar 2015 19:12:12 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 990d72a1f -> 73858d152


fixing AIRAVATA-1630


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

Branch: refs/heads/master
Commit: 73858d152a23e1e044d6c1ee74f3f9bb056baf06
Parents: 990d72a
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Fri Mar 13 15:12:07 2015 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Fri Mar 13 15:12:07 2015 -0400

----------------------------------------------------------------------
 .../airavata/gfac/core/utils/OutHandlerWorker.java       | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/73858d15/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
index d279bbe..08fa9a4 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutHandlerWorker.java
@@ -26,6 +26,8 @@ import org.apache.airavata.gfac.core.cpi.GFac;
 import org.apache.airavata.gfac.core.monitor.MonitorID;
 import org.apache.airavata.model.messaging.event.TaskIdentifier;
 import org.apache.airavata.model.messaging.event.TaskStatusChangeRequestEvent;
+import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
+import org.apache.airavata.model.workspace.experiment.ErrorCategory;
 import org.apache.airavata.model.workspace.experiment.TaskState;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -51,9 +53,16 @@ public class OutHandlerWorker implements Runnable {
             gfac.invokeOutFlowHandlers(monitorID.getJobExecutionContext());
         } catch (GFacException e) {
             TaskIdentifier taskIdentifier = new TaskIdentifier(monitorID.getTaskID(), monitorID.getWorkflowNodeID(),monitorID.getExperimentID(),
monitorID.getJobExecutionContext().getGatewayID());
-            monitorPublisher.publish(new TaskStatusChangeRequestEvent(TaskState.FAILED, taskIdentifier));
             //FIXME this is a case where the output retrieving fails even if the job execution
was a success. Thus updating the task status
+            monitorPublisher.publish(new TaskStatusChangeRequestEvent(TaskState.FAILED, taskIdentifier));
+            try {
+                GFacUtils.saveErrorDetails(monitorID.getJobExecutionContext(), e.getLocalizedMessage(),
CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            } catch (GFacException e1) {
+                logger.error("Error while persisting error details", e);
+            }
             logger.info(e.getLocalizedMessage(), e);
+            // Save error details to registry
+
         }
         monitorPublisher.publish(monitorID.getStatus());
     }


Mime
View raw message