Skip to content

Commit

Permalink
Actually randomize sleep time in WorkflowDispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
eputtone committed Aug 18, 2014
1 parent 44db1e3 commit 4c12240
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ private List<Integer> getNextInstanceIds() {

private void sleep(boolean randomize) {
try {
Thread.sleep((long)(sleepTime * rand.nextDouble()));
if (randomize) {
Thread.sleep((long)(sleepTime * rand.nextDouble()));
} else {
Thread.sleep(sleepTime);
}
} catch (InterruptedException ok) {
}
}
Expand Down

0 comments on commit 4c12240

Please sign in to comment.