Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
Improve retry logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bsideup committed Sep 9, 2016
1 parent c2cee0c commit 7307fe9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ public void perform(AmazonECS ecs, AbstractBuild<?, ?> build, Launcher launcher,
deployment.getCreatedAt()
);

shouldRetry = shouldRetry || !"PRIMARY".equalsIgnoreCase(deployment.getStatus());
if ("PRIMARY".equalsIgnoreCase(deployment.getStatus())) {
// Retry if it's PRIMARY and desired !== running
shouldRetry = shouldRetry || deployment.getDesiredCount().equals(deployment.getRunningCount());
} else {
// Retry if we found a non-primary task
shouldRetry = true;
}
}
logger.println(TABLE_LINE);
logger.println();
Expand Down

0 comments on commit 7307fe9

Please sign in to comment.