Repository: incubator-ariatosca Updated Branches: refs/heads/ARIA-289-Dont-attempt-resuming-a-workflow-which-finished-successfully bc9fbd12a -> 5783ed789 (forced update)
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/5783ed78 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/5783ed78 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/5783ed78 Branch: refs/heads/ARIA-289-Dont-attempt-resuming-a-workflow-which-finished-successfully Commit: 5783ed789c688fb978fe02aeb3b4495524bbf6d3 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 12:36:43 2017 +0300 ---------------------------------------------------------------------- README.rst | 2 +- aria/cli/commands/executions.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5783ed78/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/5783ed78/aria/cli/commands/executions.py ---------------------------------------------------------------------- diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py index b337e84..f0324ff 100644 --- a/aria/cli/commands/executions.py +++ b/aria/cli/commands/executions.py @@ -168,6 +168,12 @@ 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('Execution {execution.id} has ended with status {execution.status}. ' + 'It is not resumable'.format(execution=execution)) + return + workflow_runner = \ WorkflowRunner( model_storage, resource_storage, plugin_manager,
