diff --git a/spec/stores/task-queue-spec.coffee b/spec/stores/task-queue-spec.coffee index a298eda5b..0633d48ea 100644 --- a/spec/stores/task-queue-spec.coffee +++ b/spec/stores/task-queue-spec.coffee @@ -236,7 +236,7 @@ describe "TaskQueue", -> TaskQueue._processTask(task) advanceClock() expect(task.queueState.retryAfter).toBeDefined() - expect(task.queueState.retryDelay).toEqual(1000 * 1.2) + expect(task.queueState.retryDelay).toEqual(1000 * 2) it "increases retryDelay", -> task = @retryTaskWith({retryAfter: Date.now() - 1000, retryDelay: 2000}) @@ -244,7 +244,7 @@ describe "TaskQueue", -> TaskQueue._processTask(task) advanceClock() expect(task.queueState.retryAfter).toBeDefined() - expect(task.queueState.retryDelay).toEqual(2000 * 1.2) + expect(task.queueState.retryDelay).toEqual(2000 * 2) it "caps retryDelay", -> task = @retryTaskWith({retryAfter: Date.now() - 1000, retryDelay: 30000}) diff --git a/src/flux/stores/task-queue.coffee b/src/flux/stores/task-queue.coffee index 3712d512e..813148f8b 100644 --- a/src/flux/stores/task-queue.coffee +++ b/src/flux/stores/task-queue.coffee @@ -208,7 +208,7 @@ class TaskQueue @trigger() .then (status) => if status is Task.Status.Retry - task.queueState.retryDelay = Math.round(Math.min((task.queueState.retryDelay ? 1000) * 1.2, 30000)) + task.queueState.retryDelay = Math.round(Math.min((task.queueState.retryDelay ? 1000) * 2, 30000)) task.queueState.retryAfter = Date.now() + task.queueState.retryDelay else @dequeue(task)