robrich/sequencify — pull request #1 by OverZealous (2014-01-24 23:06:59+00:00)
Title: Added non-dependent task ordering via mustRunAfter to enable complex wor...

...kflows.

These changes enable a `mustRunAfter` property which allows for non-dependent ordered task workflows.

The only way I could see to make it work is two recursive passes over the list:

1. The first pass creates a hashmap recording all tasks and task dependencies that must be run. It handles the error in the case where a task does not exist. It should be relatively fast.
2. The second pass runs like the original recursive process, but with an additional recursion into any tasks within `mustRunAfter` that exist within the results of the first pass.

This shouldn't be much slower, and I included extra tests to verify it. I left a gap in the test tree at `h` so as to not change the test for a non-existent task, but that may be suboptimal.

This is a possible first step in fixing robrich/orchestrator#15 and OverZealous/run-sequence#1