Skip to content

Commit

Permalink
Update TaskRunner.java
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Jan 22, 2023
1 parent 068ef97 commit f58319f
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,9 @@ private <T, R> R retryOperation(Function<T, R> operation, int count, T input, St
try {
return operation.apply(input);
} catch (Exception e) {
LOGGER.error("Error executing {}", opName, e);
index++;
try {
Thread.sleep(500L);
} catch (InterruptedException ie) {
LOGGER.error("Retry interrupted", ie);
}
Uninterruptibles.sleepUninterruptibly(500L * (count+1), TimeUnit.MILLISECONDS);
}
}
throw new RuntimeException("Exhausted retries performing " + opName);
Expand Down

0 comments on commit f58319f

Please sign in to comment.