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 6A66B200CC4 for ; Thu, 29 Jun 2017 02:06:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 69213160BFA; Thu, 29 Jun 2017 00:06:57 +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 ADCBF160BF7 for ; Thu, 29 Jun 2017 02:06:56 +0200 (CEST) Received: (qmail 16158 invoked by uid 500); 29 Jun 2017 00:06:55 -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 16149 invoked by uid 99); 29 Jun 2017 00:06:55 -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; Thu, 29 Jun 2017 00:06:55 +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 697FFC0620 for ; Thu, 29 Jun 2017 00:06:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.222 X-Spam-Level: X-Spam-Status: No, score=-4.222 tagged_above=-999 required=6.31 tests=[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 17M001YoFuFZ for ; Thu, 29 Jun 2017 00:06:51 +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 686965FE64 for ; Thu, 29 Jun 2017 00:06:49 +0000 (UTC) Received: (qmail 15986 invoked by uid 99); 29 Jun 2017 00:06:49 -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; Thu, 29 Jun 2017 00:06:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CFB39DFAB0; Thu, 29 Jun 2017 00:06:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: emblemparade@apache.org To: commits@ariatosca.incubator.apache.org Date: Thu, 29 Jun 2017 00:06:54 -0000 Message-Id: In-Reply-To: <5441a2b2b81b4d3990027b685dcdf1e9@git.apache.org> References: <5441a2b2b81b4d3990027b685dcdf1e9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [07/15] incubator-ariatosca git commit: ARIA-289 Don't attempt resuming a workflow which finished successfully archived-at: Thu, 29 Jun 2017 00:06:57 -0000 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/ARIA-286-sphinx-documentation Commit: 53dc64e4c2c9c6fbba2c67c2f4b2d5edb0b36304 Parents: b1b1ee4 Author: max-orlov Authored: Wed Jun 28 12:27:38 2017 +0300 Committer: max-orlov 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 ``-subscribe@ariatosca.incubator.apache.or lists `here `__. For past correspondence, see the -`dev mailing list archive `__. +`dev mailing list archive `__. 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,