spotify/luigi — pull request #499 by daveFNbuck (2014-10-15 21:01:37+00:00)
Title: Fixes scheduler bug caused by updating priority on pruned tasks

If a task is pruned in the scheduler but a task that depends on it still exists,
the priority update recursion in add_task becomes vulnerable to encountering the
pruned task before it has been added back. Even worse, if the task that depends
on the pruned task is done, the pruned task will never be rescheduled.

This adds a test to demonstrate the code flaw and fixes it by skipping over
missing tasks in priority update. The test also shows that the priority will
still be updated appropriately if the task is eventually added back.

This resolves #498