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
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.
The text was updated successfully, but these errors were encountered:
Thank you for the report. with max_retries: 3 Req will make 4 request total, the initial one and 3 retries. There's definitely a bug. I also think the delay function should be called 3 times. That'd be my guess too that we calculate the retry delay before we figure out we hit the max retries. That it's additionally is called two times per retry is definitely a bug too. The retry logic with all the options went a bit out of the hand so it needs a rethink and possibly a re-implementation.
wojtekmach
changed the title
retry_delay fun gets called 4 times with max_retries: 3retry: retry_delay fun gets called 4 times with max_retries: 3Mar 22, 2024
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 retry0
), 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 formax_retries: 3
I need a list of length4
(indices 0..3).Is that correct?
Thank you.
The text was updated successfully, but these errors were encountered: