Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from taskflow import engines as eng
- from taskflow.patterns import linear_flow as lf
- from taskflow import task
- class MyTask(task.Task):
- def execute(self):
- raise ValueError('foo')
- def revert(self, *a, **k):
- raise ValueError('bar')
- flo = lf.Flow("test")
- flo.add(MyTask())
- eng.run(flo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement