Advertisement
Guest User

Untitled

a guest
Apr 18th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. from taskflow import engines as eng
  2. from taskflow.patterns import linear_flow as lf
  3. from taskflow import task
  4. class MyTask(task.Task):
  5. def execute(self):
  6. raise ValueError('foo')
  7. def revert(self, *a, **k):
  8. raise ValueError('bar')
  9. flo = lf.Flow("test")
  10. flo.add(MyTask())
  11. eng.run(flo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement