mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-19 16:03:00 +00:00
Merge pull request #3204 from kreuzert/exponential_backoff_overflow_exception
Prevent OverflowErrors in exponential_backoff()
This commit is contained in:
@@ -173,7 +173,8 @@ async def exponential_backoff(
|
||||
# this prevents overloading any single tornado loop iteration with
|
||||
# too many things
|
||||
dt = min(max_wait, remaining, random.uniform(0, start_wait * scale))
|
||||
scale *= scale_factor
|
||||
if dt < max_wait:
|
||||
scale *= scale_factor
|
||||
await gen.sleep(dt)
|
||||
raise TimeoutError(fail_message)
|
||||
|
||||
|
Reference in New Issue
Block a user