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
I exerted the related code from ruby-auth0/lib/auth0/mixins/httpproxy.rb
DEAFULT_RETRIES=3MAX_ALLOWED_RETRIES=10MAX_REQUEST_RETRY_JITTER=250MAX_REQUEST_RETRY_DELAY=1000MIN_REQUEST_RETRY_DELAY=100sleep_timer=lambdado |attempt|
wait=1000 * 2**attempt# Exponential delay with each subsequent request attempt.wait += rand(wait..wait+MAX_REQUEST_RETRY_JITTER)# Add jitter to the delay window.wait=[MAX_REQUEST_RETRY_DELAY,wait].min# Cap delay at MAX_REQUEST_RETRY_DELAY.wait=[MIN_REQUEST_RETRY_DELAY,wait].max# Ensure delay is no less than MIN_REQUEST_RETRY_DELAY.wait / 1000.to_f.round(2)# convert ms to secondsendMAX_ALLOWED_RETRIES.times{ |attempt|
psleep_timer.call(attempt)}# => 1.0# => 1.0# => 1.0# => 1.0# => 1.0# => 1.0# => 1.0# => 1.0# => 1.0# => 1.0
exponential backoff is not applied and wait is always 1.0.
What was the expected behavior?
if I comment some codes out, it will work as commented.
DEAFULT_RETRIES=3MAX_ALLOWED_RETRIES=10MAX_REQUEST_RETRY_JITTER=250MAX_REQUEST_RETRY_DELAY=1000MIN_REQUEST_RETRY_DELAY=100sleep_timer=lambdado |attempt|
wait=1000 * 2**attempt# Exponential delay with each subsequent request attempt.wait += rand(wait..wait+MAX_REQUEST_RETRY_JITTER)# Add jitter to the delay window.# wait = [MAX_REQUEST_RETRY_DELAY, wait].min # Cap delay at MAX_REQUEST_RETRY_DELAY.# wait = [MIN_REQUEST_RETRY_DELAY, wait].max # Ensure delay is no less than MIN_REQUEST_RETRY_DELAY.wait / 1000.to_f.round(2)# convert ms to secondsendMAX_ALLOWED_RETRIES.times{ |attempt|
psleep_timer.call(attempt)}# => 2.144# => 4.171# => 8.135# => 16.049# => 32.177# => 64.19# => 128.167# => 256.134# => 512.122# => 1024.223
exponential backoff is applied.
The text was updated successfully, but these errors were encountered:
Describe the problem
I exerted the related code from ruby-auth0/lib/auth0/mixins/httpproxy.rb
exponential backoff is not applied and
wait
is always 1.0.What was the expected behavior?
if I comment some codes out, it will work as commented.
exponential backoff is applied.
The text was updated successfully, but these errors were encountered: