-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename events & run in hook functions
- Loading branch information
Showing
5 changed files
with
26 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
__author__ = '[email protected]' | ||
|
||
|
||
def on_reached_cb(workflow, task, completed_set): | ||
def on_ready_cb(workflow, task, completed_set): | ||
# In workflows that load a subworkflow, the newly loaded children | ||
# will not have on_reached_cb() assigned. By using this function, we | ||
# re-assign the function in every step, thus making sure that new | ||
|
@@ -24,9 +24,9 @@ def on_complete_cb(workflow, task, completed_set): | |
|
||
|
||
def track_task(task_spec, completed_set): | ||
if task_spec.reached_event.is_connected(on_reached_cb): | ||
task_spec.reached_event.disconnect(on_reached_cb) | ||
task_spec.reached_event.connect(on_reached_cb, completed_set) | ||
if task_spec.ready_event.is_connected(on_ready_cb): | ||
task_spec.ready_event.disconnect(on_ready_cb) | ||
task_spec.ready_event.connect(on_ready_cb, completed_set) | ||
if task_spec.completed_event.is_connected(on_complete_cb): | ||
task_spec.completed_event.disconnect(on_complete_cb) | ||
task_spec.completed_event.connect(on_complete_cb, completed_set) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters