You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating an ExponentialBackoff policy, I'd like to be able to specify two things:
That I'll try at most 3 times,
That I'll try for at most 60 seconds, whether or not I am able to complete 3 retries within the 60 seconds.
Solution
ExponentialBackoffBuilder would have a build_with_max_retries_and_total_duration method
or
ExponentialBackoffTimed::backoff would be public so that I could set ExponentialBackoff::max_n_retries (which is already public)
or
ExponentialBackoffBuilder would have a max_n_retries method that could be used to set it before calling build_with_total_duration.
Alternatives
I had assumed that build_with_total_retry_duration_and_max_retries would already accept a duration and number of retries, until I looked closer and saw that it calculates the number of retries that could fit within the duration. But what I'd like is a way to specify what's described in the doc comment: "...enforce whatever comes first, max retries or total duration."
The text was updated successfully, but these errors were encountered:
Motivations
When creating an ExponentialBackoff policy, I'd like to be able to specify two things:
Solution
ExponentialBackoffBuilder
would have abuild_with_max_retries_and_total_duration
methodor
ExponentialBackoffTimed::backoff
would be public so that I could setExponentialBackoff::max_n_retries
(which is already public)or
ExponentialBackoffBuilder
would have amax_n_retries
method that could be used to set it before callingbuild_with_total_duration
.Alternatives
I had assumed that
build_with_total_retry_duration_and_max_retries
would already accept a duration and number of retries, until I looked closer and saw that it calculates the number of retries that could fit within the duration. But what I'd like is a way to specify what's described in the doc comment: "...enforce whatever comes first, max retries or total duration."The text was updated successfully, but these errors were encountered: