Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-30-SQL-based-storage-implementation 97ddc94b0 -> 2fa5b7bfe
refresh task Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/2fa5b7bf Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/2fa5b7bf Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/2fa5b7bf Branch: refs/heads/ARIA-30-SQL-based-storage-implementation Commit: 2fa5b7bfe494bf9bb143931e855806e5ee9a65d2 Parents: 97ddc94 Author: mxmrlv <[email protected]> Authored: Wed Dec 7 18:53:43 2016 +0200 Committer: mxmrlv <[email protected]> Committed: Wed Dec 7 18:53:43 2016 +0200 ---------------------------------------------------------------------- aria/orchestrator/workflows/core/engine.py | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2fa5b7bf/aria/orchestrator/workflows/core/engine.py ---------------------------------------------------------------------- diff --git a/aria/orchestrator/workflows/core/engine.py b/aria/orchestrator/workflows/core/engine.py index 87ea8c6..35aa976 100644 --- a/aria/orchestrator/workflows/core/engine.py +++ b/aria/orchestrator/workflows/core/engine.py @@ -63,6 +63,7 @@ class Engine(logger.LoggerMixin): break else: time.sleep(0.1) + self.refresh_tasks() if cancel: events.on_cancelled_workflow_signal.send(self._workflow_context) else: @@ -71,6 +72,11 @@ class Engine(logger.LoggerMixin): events.on_failure_workflow_signal.send(self._workflow_context, exception=e) raise + def refresh_tasks(self): + for task in self._tasks_iter(): + if isinstance(task, engine_task.OperationTask): + self._workflow_context.model.task.refresh(task) + def cancel_execution(self): """ Send a cancel request to the engine. If execution already started, execution status
