Open
Description
I'm using failsafe for a job that should run 'forever' with the following code:
RetryPolicy<Object> retryPolicy = RetryPolicy.builder()
.withMaxRetries(-1)
.withBackoff(Duration.ofSeconds(2), Duration.ofMinutes(2), 2.0)
.onFailedAttempt(event -> log.warn("Backoff from failure", event.getLastException()))
.build();
var future = Failsafe.with(retryPolicy)
.with(executor)
.runAsync(this::runOnce);
Is there a way to reset the backoff delay to the initial delay when the job has been running for a given duration (say half an hour)? Or would it be an option to add a backoffReset duration?
If there is a better way to achieve my use case then please let me know.