ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm...@apache.org
Subject incubator-ariatosca git commit: ARIA-289 Don't attempt resuming a workflow which finished successfully
Date Wed, 28 Jun 2017 09:27:44 GMT
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-289-Dont-attempt-resuming-a-workflow-which-finished-successfully b1b1ee445
-> a2892f183


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/a2892f18
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/a2892f18
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/a2892f18

Branch: refs/heads/ARIA-289-Dont-attempt-resuming-a-workflow-which-finished-successfully
Commit: a2892f1836dd0eec1d43392e516e6cedc2224fbf
Parents: b1b1ee4
Author: max-orlov <maxim@gigaspaces.com>
Authored: Wed Jun 28 12:27:38 2017 +0300
Committer: max-orlov <maxim@gigaspaces.com>
Committed: Wed Jun 28 12:27:38 2017 +0300

----------------------------------------------------------------------
 aria/cli/commands/executions.py | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a2892f18/aria/cli/commands/executions.py
----------------------------------------------------------------------
diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py
index b337e84..ce434df 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.has_ended():
+        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,


Mime
View raw message