backon icon indicating copy to clipboard operation
backon copied to clipboard

feat: Allow to control the max sleep time of exponential backoff

Open Xuanwo opened this issue 1 year ago • 3 comments

Sometimes user want a max duration for exponential backoff instead of reaching the max times.

Xuanwo avatar Sep 06 '24 04:09 Xuanwo

Hi, would you like to elaborate on this a bit? What is the difference between this and the ExponentialBuilder.with_max_delay(max_dur) API?

SteveLauC avatar Sep 12 '24 00:09 SteveLauC

ExponentialBuilder.with_max_delay(max_dur)

The max_delay is the delay for each sleep, but this feature requires a total_delay so users can ensure that the retry won't exceed the total_delay.

Xuanwo avatar Sep 12 '24 01:09 Xuanwo

Get it, let me take a look at this:)

SteveLauC avatar Sep 12 '24 01:09 SteveLauC