This is an automated email from the ASF dual-hosted git repository. dimuthuupe pushed a commit to branch staging in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/staging by this push: new 274c73f Task retrying if the context load failed 274c73f is described below commit 274c73ffcc226daabfbe213a27b8f10ad53dac0b Author: Dimuthu Wannipurage <dimuthu.wannipur...@datasprouts.com> AuthorDate: Sun Nov 11 01:01:38 2018 -0500 Task retrying if the context load failed --- .../main/java/org/apache/airavata/helix/impl/task/AiravataTask.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/AiravataTask.java b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/AiravataTask.java index 56565f2..3a917da 100644 --- a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/AiravataTask.java +++ b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/AiravataTask.java @@ -347,8 +347,10 @@ public abstract class AiravataTask extends AbstractTask { publishTaskState(TaskState.EXECUTING); } return onRun(helper, getTaskContext()); + } catch (TaskOnFailException e) { + return onFail("Captured a task fail : " + e.getReason(), e.isCritical(), e); } catch (Exception e) { - return onFail("Unknown error while running task " + getTaskId(), true, e); + return onFail("Unknown error while running task " + getTaskId(), false, e); } finally { MDC.clear(); } @@ -422,7 +424,7 @@ public abstract class AiravataTask extends AbstractTask { } catch (Exception e) { logger.error("Error occurred while initializing the task " + getTaskId() + " of experiment " + getExperimentId(), e); - throw new TaskOnFailException("Error occurred while initializing the task " + getTaskId() + " of experiment " + getExperimentId(), true, e); + throw new TaskOnFailException("Error occurred while initializing the task " + getTaskId() + " of experiment " + getExperimentId(), false, e); } }