req
req copied to clipboard
`retry`: `retry_delay` fun gets called 4 times with `max_retries: 3`
If the function should return a delay for a retry, configuring max_retries: 3
should result in 3 calls for the function only, not 4.
(Actually the callback is called 2 times for each index, so 8 calls in total)
I am trying to configure our code with the correct delays, so I would like to know what to return when the passed index is 0
. As far as I can tell it is indeed the delay between the first attempt and the second attempt (aka retry 0
), and the last call to the callback (after max_retries is exhausted) has its return value discarded.
So if I want my code to work, my list of delay values should be validate length(delay_list) == max_retries + 1
, So for max_retries: 3
I need a list of length 4
(indices 0..3).
Is that correct?
Thank you.