Ensure activity and decision tasks cannot progress on a closed workflow

This is a second barrier because I'm a little nervous about this and I
don't want moto/swf to make any activity progress while in the real
world service, it's strictly impossible once the execution is closed.
Python doesn't seem to have any nice way of freezing an object so here
we go with a manual boundary...
This commit is contained in:
Jean-Baptiste Barth 2015-11-05 01:12:51 +01:00
commit 61bb550052
5 changed files with 60 additions and 4 deletions

View file

@ -119,3 +119,8 @@ class SWFDecisionValidationException(SWFClientError):
prefix.format(count) + "; ".join(messages),
"com.amazon.coral.validate#ValidationException"
)
class SWFWorkflowExecutionClosedError(Exception):
def __str__(self):
return repr("Cannot change this object because the WorkflowExecution is closed")