Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-30-SQL-based-storage-implementation 24e06d68a -> df1c2abc0 (forced update)
tmp fix Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/df1c2abc Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/df1c2abc Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/df1c2abc Branch: refs/heads/ARIA-30-SQL-based-storage-implementation Commit: df1c2abc00a524a77d8172b871861758c0682d59 Parents: 2fa5b7b Author: mxmrlv <[email protected]> Authored: Wed Dec 7 18:59:02 2016 +0200 Committer: mxmrlv <[email protected]> Committed: Wed Dec 7 19:12:21 2016 +0200 ---------------------------------------------------------------------- aria/orchestrator/workflows/core/engine.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/df1c2abc/aria/orchestrator/workflows/core/engine.py ---------------------------------------------------------------------- diff --git a/aria/orchestrator/workflows/core/engine.py b/aria/orchestrator/workflows/core/engine.py index 35aa976..2d26aeb 100644 --- a/aria/orchestrator/workflows/core/engine.py +++ b/aria/orchestrator/workflows/core/engine.py @@ -63,7 +63,6 @@ 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: @@ -72,11 +71,6 @@ 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 @@ -106,7 +100,11 @@ class Engine(logger.LoggerMixin): return len(self._execution_graph.node) == 0 def _tasks_iter(self): - return (data['task'] for _, data in self._execution_graph.nodes_iter(data=True)) + for _, data in self._execution_graph.nodes_iter(data=True): + task = data['task'] + if isinstance(task, engine_task.OperationTask): + self._workflow_context.model.task.refresh(task.model_task) + yield task def _handle_executable_task(self, task): if isinstance(task, engine_task.StubTask):
