-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reinstate broadcast subscription of workchain for child processes
When a `WorkChain` step submits sub processes, awaitables will be created for them. Only when these awaitables have been resolved, meaning the subprocesses, have terminated, can the workchain continue to the next step. The original concept was, for each awaitable, to schedule a callback once the process had reached a terminal state. The callback was supposed to be triggered by having the runner add a broadcast subscriber that would listen for state changes of the sub process. As a fail-safe, a polling mechanism would also check periodically just in case the broadcast message would be missed and prevent the caller from waiting indefinitely. However, the broadcast subscriber was never added and so the system relied solely on the polling mechanism. This completely undermines the benefits of having an event-based mechanism, so in this commit the `Runner.call_on_process_finish` now also registers the broadcast subscriber. Note that the affected code had some references to `calculation` which has been generalized to `process`, since this also applies to workflows that might waited upon. The `CalculationFuture` has been renamed to `ProcessFuture` in similar vein. It is currently not used, but it could have been used for the problem that this commit solves, so it has been decided to leave it in for now and not remove it entirely.
- Loading branch information
Showing
10 changed files
with
134 additions
and
90 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
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
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
Oops, something went wrong.