Limit the worker retry delay to maximum 1 hour
Closes #13779 (grafted from b6f5daac0e2b605ca23b360e80066e51eca5bcfb) --HG-- branch : 7.0
This commit is contained in:
@@ -174,7 +174,7 @@ def run_task(pool, task_id):
|
||||
duration = (task.scheduled_at - task.enqueued_at) * 2
|
||||
else:
|
||||
duration = dt.timedelta(seconds=2 * retry)
|
||||
duration = max(duration, dt.timedelta(hours=1))
|
||||
duration = min(duration, dt.timedelta(hours=1))
|
||||
scheduled_at = dt.datetime.now() + duration * random.random()
|
||||
Queue.push(task.name, task.data, scheduled_at=scheduled_at)
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user