Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-48-aria-cli 31a0c794f -> 8b4cd4ac9


fixed active executions validation in workflow runner


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/8b4cd4ac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/8b4cd4ac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/8b4cd4ac

Branch: refs/heads/ARIA-48-aria-cli
Commit: 8b4cd4ac949ceb06c0940f6626d7e7e7dcec41b2
Parents: 31a0c79
Author: Ran Ziv <[email protected]>
Authored: Tue Apr 4 14:21:20 2017 +0300
Committer: Ran Ziv <[email protected]>
Committed: Tue Apr 4 14:21:20 2017 +0300

----------------------------------------------------------------------
 aria/orchestrator/workflow_runner.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/8b4cd4ac/aria/orchestrator/workflow_runner.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index 982dff1..cb19ebc 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -119,9 +119,7 @@ class WorkflowRunner(object):
                                 .format(self._workflow_name, 
self.service.name))
 
     def _validate_no_active_executions(self):
-        active_executions_filter = dict(service=self.service,
-                                        status=models.Execution.ACTIVE_STATES)
-        active_executions = 
self._model_storage.execution.list(filter=active_executions_filter)
+        active_executions = [e for e in self.service.executions if 
e.is_active()]
         if active_executions:
             raise AriaException("Can't start execution; Service {0} has a 
running "
                                 "execution with id {1}"

Reply via email to