Repository: incubator-ariatosca Updated Branches: refs/heads/master b1b1ee445 -> 53dc64e4c
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/master Commit: 53dc64e4c2c9c6fbba2c67c2f4b2d5edb0b36304 Parents: b1b1ee4 Author: max-orlov <[email protected]> Authored: Wed Jun 28 12:27:38 2017 +0300 Committer: max-orlov <[email protected]> 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>[email protected] 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 <https://lists.apache.org/[email protected]>`__. 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,
