You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2018/03/26 16:06:56 UTC
[airavata] branch develop updated: Deleting status node before
updating it
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/develop by this push:
new 7b20506 Deleting status node before updating it
7b20506 is described below
commit 7b2050668d4fceace02e9e50215e0f4599f80b0a
Author: dimuthu <di...@gmail.com>
AuthorDate: Mon Mar 26 12:06:50 2018 -0400
Deleting status node before updating it
---
.../apache/airavata/helix/impl/workflow/PostWorkflowManager.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/workflow/PostWorkflowManager.java b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/workflow/PostWorkflowManager.java
index e0d5999..0b796a6 100644
--- a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/workflow/PostWorkflowManager.java
+++ b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/workflow/PostWorkflowManager.java
@@ -138,8 +138,11 @@ public class PostWorkflowManager {
}
private void updateStatusOfJob(String jobId, JobState jobState) throws Exception {
- this.curatorClient.create().creatingParentsIfNeeded().withMode(CreateMode.PERSISTENT).forPath(
- "/monitoring/" + jobId + "/status", jobState.name().getBytes());
+ String path = "/monitoring/" + jobId + "/status";
+ if (this.curatorClient.checkExists().forPath(path) != null) {
+ this.curatorClient.delete().forPath(path);
+ }
+ this.curatorClient.create().creatingParentsIfNeeded().withMode(CreateMode.PERSISTENT).forPath(path, jobState.name().getBytes());
}
private JobState getCurrentStatusOfJob(String jobId) throws Exception {
--
To stop receiving notification emails like this one, please contact
dimuthuupe@apache.org.