mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-17 18:46:35 +00:00
Best wishes to the next century
This commit is contained in:
parent
7c3404573c
commit
be8a2035ba
@ -74,12 +74,12 @@ def exponential_backoff(task_func=None, /, *args, **kwargs):
|
|||||||
try:
|
try:
|
||||||
return fn(*a, **kwa)
|
return fn(*a, **kwa)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
for attempt in range(1, 1_001):
|
for attempt in range(1, 240):
|
||||||
if backoff(attempt) > task.retry_delay:
|
if backoff(attempt) > task.retry_delay:
|
||||||
task.retry_delay = backoff(attempt)
|
task.retry_delay = backoff(attempt)
|
||||||
break
|
break
|
||||||
# insanity, but handle it anyway
|
# insanity, but handle it anyway
|
||||||
if 1_000 == attempt:
|
if 239 == attempt:
|
||||||
task.retry_delay = backoff(attempt)
|
task.retry_delay = backoff(attempt)
|
||||||
raise exc
|
raise exc
|
||||||
kwargs.update(dict(
|
kwargs.update(dict(
|
||||||
|
Loading…
Reference in New Issue
Block a user