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/7633058c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/7633058c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/7633058c

Branch: refs/heads/ARIA-48-aria-cli
Commit: 7633058c350cbde8388ae431f241cb83c901c27c
Parents: b732ab7
Author: Ran Ziv <[email protected]>
Authored: Tue Apr 4 14:21:20 2017 +0300
Committer: Ran Ziv <[email protected]>
Committed: Thu Apr 6 11:29:17 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/7633058c/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