[Fix-16764] Tasks dispatched failed weren't delayed properly as documented in GlobalTaskDispatchWaitingQueueLooper

This commit is contained in:
slimtom95 2024-11-05 15:19:43 +08:00 committed by GitHub
parent 7876d455ab
commit d19655fd1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,7 +80,7 @@ public class GlobalTaskDispatchWaitingQueueLooper extends BaseDaemonThread imple
// If dispatch failed, will put the task back to the queue
// The task will be dispatched after waiting time.
// the waiting time will increase multiple of times, but will not exceed 60 seconds
long waitingTimeMills = Math.max(
long waitingTimeMills = Math.min(
taskExecutionRunnable.getTaskExecutionContext().increaseDispatchFailTimes() * 1_000L, 60_000L);
globalTaskDispatchWaitingQueue.dispatchTaskExecuteRunnableWithDelay(taskExecutionRunnable,
waitingTimeMills);