Possibility to set Initial delay
See original GitHub issueIs there a way to set up initial delay before first attempt? If no would be nice to have such possibility.
My current retry config looks like this: ``` RetryConfig config = RetryConfig.custom() .maxAttempts(exponentialRetryConfiguration.getMaxAmountOfAttempts()) .intervalFunction(intervalFn) .build();
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Set initial delay to a Periodic Work Manager in Android
PeriodicWorkRequests now support initial delays. You can use the setInitialDelay method on PeriodicWorkRequest. Builder to set an initial delay.
Read more >Set initial delay for periodic work - Issue Tracker - Google
I find that the immediate work is performed at 0 mins (triggered explicitly, not by WorkManager, so that's as expected), then at 15...
Read more >Set initial delay to a Periodic Work Manager in Android-kotlin
PeriodicWorkRequests now support initial delays. You can use the setInitialDelay method on PeriodicWorkRequest. Builder to set an initial delay.
Read more >Define work requests | Android Developers
Backoff delay specifies the minimum amount of time to wait before retrying your work after the first attempt. This value can be no...
Read more >Delay | AnyLogic Help
If the option is selected (true), the capacity of the Delay is maximum possible (limited by Integer.MAX_VALUE). Syntax: boolean maximumCapacity. Default value: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe custom, provided implementation of intervalFunction (with specific first interval as a delay) would help.
You are right. The
waitDuration
property is ignored, if a custom interval function is used. The config property ``waitDurationjust a shortcut for a constant interval function like
(numOfAttempts) -> waitDuration.toMillis()`The initial wait duration is calculated at runtime as follows:
long interval = intervalFunction.apply(numOfAttempts.get());
In your case the initial delay before the first retry attempt is
config.getInitialExponentialDelay()
.