You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mx...@apache.org on 2017/05/07 16:04:35 UTC
incubator-ariatosca git commit: wip...!
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-214-Dry-execution-changes-the-state-of-non-implemented-operations bfbd86fa2 -> 3d36ebf12
wip...!
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/3d36ebf1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/3d36ebf1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/3d36ebf1
Branch: refs/heads/ARIA-214-Dry-execution-changes-the-state-of-non-implemented-operations
Commit: 3d36ebf12d28848e548bdb6d5942194538665c6d
Parents: bfbd86f
Author: max-orlov <ma...@gigaspaces.com>
Authored: Sun May 7 19:04:29 2017 +0300
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Sun May 7 19:04:29 2017 +0300
----------------------------------------------------------------------
aria/orchestrator/workflows/executor/base.py | 8 ++++----
aria/orchestrator/workflows/executor/dry.py | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3d36ebf1/aria/orchestrator/workflows/executor/base.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/workflows/executor/base.py b/aria/orchestrator/workflows/executor/base.py
index e55c736..8682e09 100644
--- a/aria/orchestrator/workflows/executor/base.py
+++ b/aria/orchestrator/workflows/executor/base.py
@@ -33,11 +33,11 @@ class BaseExecutor(logger.LoggerMixin):
Execute a task
:param task: task to execute
"""
- if getattr(task, 'model_task') and task.model_task.implementation:
+ if task.implementation:
+ self._execute(task)
+ else:
self._task_started(task)
self._task_succeeded(task)
- else:
- self._execute(task)
def close(self):
"""
@@ -58,6 +58,6 @@ class BaseExecutor(logger.LoggerMixin):
events.on_success_task_signal.send(task)
-class StubTaskExecutor(BaseExecutor):
+class StubTaskExecutor(BaseExecutor): # pylint: disable=abstract-method
def execute(self, task):
task.status = task.SUCCESS
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3d36ebf1/aria/orchestrator/workflows/executor/dry.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/workflows/executor/dry.py b/aria/orchestrator/workflows/executor/dry.py
index 5a4ca73..f6fb7a6 100644
--- a/aria/orchestrator/workflows/executor/dry.py
+++ b/aria/orchestrator/workflows/executor/dry.py
@@ -21,7 +21,7 @@ from datetime import datetime
from .base import BaseExecutor
-class DryExecutor(BaseExecutor):
+class DryExecutor(BaseExecutor): # pylint: disable=abstract-method
"""
Executor which dry runs tasks - prints task information without causing any side effects
"""