You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ariatosca.apache.org by em...@apache.org on 2017/06/29 00:06:54 UTC
[07/15] incubator-ariatosca git commit: ARIA-289 Don't attempt
resuming a workflow which finished successfully
ARIA-289 Don't attempt resuming a workflow which finished successfully
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/53dc64e4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/53dc64e4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/53dc64e4
Branch: refs/heads/ARIA-286-sphinx-documentation
Commit: 53dc64e4c2c9c6fbba2c67c2f4b2d5edb0b36304
Parents: b1b1ee4
Author: max-orlov <ma...@gigaspaces.com>
Authored: Wed Jun 28 12:27:38 2017 +0300
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Wed Jun 28 14:06:31 2017 +0300
----------------------------------------------------------------------
README.rst | 2 +-
aria/cli/commands/executions.py | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/53dc64e4/README.rst
----------------------------------------------------------------------
diff --git a/README.rst b/README.rst
index d4740cd..b9a8213 100644
--- a/README.rst
+++ b/README.rst
@@ -138,7 +138,7 @@ Subscribe by sending a mail to ``<group>-subscribe@ariatosca.incubator.apache.or
lists `here <https://www.apache.org/foundation/mailinglists.html>`__.
For past correspondence, see the
-`dev mailing list archive <http://mail-archives.apache.org/mod_mbox/incubator-ariatosca-dev/>`__.
+`dev mailing list archive <ht...@ariatosca.apache.org>`__.
License
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/53dc64e4/aria/cli/commands/executions.py
----------------------------------------------------------------------
diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py
index b337e84..9f56ccd 100644
--- a/aria/cli/commands/executions.py
+++ b/aria/cli/commands/executions.py
@@ -168,6 +168,14 @@ def resume(execution_id,
logger):
executor = DryExecutor() if dry else None # use WorkflowRunner's default executor
+ execution = model_storage.execution.get(execution_id)
+ if execution.status != execution.status.CANCELLED:
+ logger.info("Can't resume execution {execution.id} - "
+ "execution is in status {execution.status}. "
+ "Can only resume executions in status {valid_status}"
+ .format(execution=execution, valid_status=execution.status.CANCELLED))
+ return
+
workflow_runner = \
WorkflowRunner(
model_storage, resource_storage, plugin_manager,