Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #status()-> insert() -> read() ->compare(), propagate ret from compare into status()
- @task
- def status(email, callback=None):
- ret = insert.delay(email, callback=subtask(read, callback=subtask(compare)))
- #i want to propagate return 'somedata' from compare here
- @task
- def insert(email, callback=None):
- ehash = email
- if callback:
- subtask(callback).delay(ehash)
- @task
- def read(ehash, callback=None):
- nhash = 'bemail'
- if callback:
- subtask(callback).delay(ehash, nhash)
- @task
- def compare(ehash, nhash):
- if ehash == nhash:
- print 'ZHODA'
- else:
- print 'NEZHODA'
- return 'somedata'
Add Comment
Please, Sign In to add comment