Skip to content
This repository has been archived by the owner on Jul 17, 2018. It is now read-only.

Commit

Permalink
ARIA-289 Don't attempt resuming a workflow which finished successfully
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmrlv committed Jun 28, 2017
1 parent b1b1ee4 commit 53dc64e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -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 <https://lists.apache.org/list.html?dev@ariatosca.apache.org>`__.


License
Expand Down
8 changes: 8 additions & 0 deletions aria/cli/commands/executions.py
Expand Up @@ -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,
Expand Down

0 comments on commit 53dc64e

Please sign in to comment.