Skip to content

Commit e1e8c1c

Browse files
committed
fix(task-queue): task queue dependencies are only for preceding tasks
1 parent 3b283e2 commit e1e8c1c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/flux/stores/task-queue.coffee

+6-2
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,13 @@ class TaskQueue
295295
otherTask.isDependentOnTask(failedTask) and
296296
otherTask.shouldBeDequeuedOnDependencyFailure()
297297

298+
# If any tasks queued BEFORE my tasks fail the dependency check, then
299+
# block.
298300
_taskIsBlocked: (task) =>
299-
_.any @_queue, (otherTask) ->
300-
task isnt otherTask and task.isDependentOnTask(otherTask)
301+
for otherTask in @_queue
302+
return false if otherTask is task
303+
return true if task.isDependentOnTask(otherTask)
304+
return false
301305

302306
_resolveTaskArgument: (taskOrId) =>
303307
if not taskOrId

src/pro

Submodule pro updated from 197c2a6 to a8d19e8

0 commit comments

Comments
 (0)