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

Commit

Permalink
Extract magic numbers to constants
Browse files Browse the repository at this point in the history
Signed-off-by: Moti Asayag <masayag@redhat.com>
  • Loading branch information
masayag authored and openshift-merge-robot committed Jun 8, 2023
1 parent fc8b1fc commit bbb1307
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

public class RetryExecutorService<T> implements AutoCloseable {

private static final int MAX_RETRY_TIME = 2 * 60 * 1000; // 2 minutes

public static final int RETRY_DELAY = 5 * 1000; // 5 seconds

private final ScheduledExecutorService scheduledExecutor;

public RetryExecutorService() {
Expand All @@ -24,7 +28,7 @@ public RetryExecutorService() {
*/
public T submitWithRetry(Callable<T> task) {
// @formatter:off
return submitWithRetry(task, () -> {}, () -> {}, 2 * 60 * 1000, 5000);
return submitWithRetry(task, () -> {}, () -> {}, MAX_RETRY_TIME, RETRY_DELAY);
// @formatter:on
}

Expand Down

0 comments on commit bbb1307

Please sign in to comment.