You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mx...@apache.org on 2017/01/05 09:33:04 UTC
incubator-ariatosca git commit: ARIA-57-Custom executions state
transition support
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-57-Custom-executions-state-transition-support [created] 69e868770
ARIA-57-Custom executions state transition support
As part of this commit, a new valid transition was added between cancelling
and force cancelling
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/69e86877
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/69e86877
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/69e86877
Branch: refs/heads/ARIA-57-Custom-executions-state-transition-support
Commit: 69e8687705767ec1962f27916df8417eb59eef0e
Parents: 860d69b
Author: mxmrlv <mx...@gmail.com>
Authored: Thu Jan 5 11:32:08 2017 +0200
Committer: mxmrlv <mx...@gmail.com>
Committed: Thu Jan 5 11:32:08 2017 +0200
----------------------------------------------------------------------
aria/storage/base_model.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/69e86877/aria/storage/base_model.py
----------------------------------------------------------------------
diff --git a/aria/storage/base_model.py b/aria/storage/base_model.py
index c7eb27c..d1aebf2 100644
--- a/aria/storage/base_model.py
+++ b/aria/storage/base_model.py
@@ -146,7 +146,7 @@ class ExecutionBase(ModelMixin):
VALID_TRANSITIONS = {
PENDING: [STARTED, CANCELLED],
STARTED: END_STATES + [CANCELLING],
- CANCELLING: END_STATES
+ CANCELLING: END_STATES + [FORCE_CANCELLING]
}
@orm.validates('status')
@@ -156,7 +156,7 @@ class ExecutionBase(ModelMixin):
current_status = getattr(self, key)
except AttributeError:
return
- valid_transitions = ExecutionBase.VALID_TRANSITIONS.get(current_status, [])
+ valid_transitions = self.VALID_TRANSITIONS.get(current_status, [])
if all([current_status is not None,
current_status != value,
value not in valid_transitions]):