Skip to content

Commit

Permalink
Update Workflow: add abstract method .on_failure()
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Leclercq committed Jul 16, 2014
1 parent de7550e commit b70d3c2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions simpleflow/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,10 @@ def fail(self, reason, details=None):

def run(self, *args, **kwargs):
raise NotImplementedError

def on_failure(self, history, reason, details=None):
"""
The executor calls this method when the workflow fails.
"""
raise NotImplementedError

0 comments on commit b70d3c2

Please sign in to comment.