Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D15DE200CAD for ; Wed, 28 Jun 2017 11:27:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D00A8160BF7; Wed, 28 Jun 2017 09:27:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1F1C7160BE8 for ; Wed, 28 Jun 2017 11:27:47 +0200 (CEST) Received: (qmail 53846 invoked by uid 500); 28 Jun 2017 09:27:47 -0000 Mailing-List: contact commits-help@ariatosca.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ariatosca.incubator.apache.org Delivered-To: mailing list commits@ariatosca.incubator.apache.org Received: (qmail 53837 invoked by uid 99); 28 Jun 2017 09:27:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2017 09:27:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id EFD70C0158 for ; Wed, 28 Jun 2017 09:27:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.221 X-Spam-Level: X-Spam-Status: No, score=-4.221 tagged_above=-999 required=6.31 tests=[HK_RANDOM_FROM=0.001, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id G2sjFa-khmyW for ; Wed, 28 Jun 2017 09:27:45 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id ECA9F5F19B for ; Wed, 28 Jun 2017 09:27:44 +0000 (UTC) Received: (qmail 53832 invoked by uid 99); 28 Jun 2017 09:27:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2017 09:27:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 10F60DFB8A; Wed, 28 Jun 2017 09:27:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mxmrlv@apache.org To: commits@ariatosca.incubator.apache.org Message-Id: <71c5abd5b05d4a31a6e9a25ba798b364@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-ariatosca git commit: ARIA-289 Don't attempt resuming a workflow which finished successfully Date: Wed, 28 Jun 2017 09:27:44 +0000 (UTC) archived-at: Wed, 28 Jun 2017 09:27:49 -0000 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 Authored: Wed Jun 28 12:27:38 2017 +0300 Committer: max-orlov 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,