Skip to content

Commit

Permalink
Fixing the bug of trying to create created resources during update, a…
Browse files Browse the repository at this point in the history
…dding better way to name gen resource names
  • Loading branch information
anuchandy committed Jun 16, 2016
1 parent 738d121 commit bb4a917
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@ public void execute() throws Exception {
while (nextNode != null) {
if (dag.isRootNode(nextNode)) {
executeRootTask(nextNode.data());
dag.reportedCompleted(nextNode);
} else {
nextNode.data().execute();
// TaskGroupBase::execute will be called both in update and create
// scenarios, so run the task only if it not not executed already.
if (nextNode.data().result() == null) {
nextNode.data().execute();
dag.reportedCompleted(nextNode);
}
}
dag.reportedCompleted(nextNode);
nextNode = dag.getNext();
}
}
Expand Down

0 comments on commit bb4a917

Please sign in to comment.