Skip to content

Instantly share code, notes, and snippets.

@tonywangcn
Created February 24, 2017 16:56
Show Gist options
  • Save tonywangcn/1ba71c018b33ce807b35b10efcb5f748 to your computer and use it in GitHub Desktop.
Save tonywangcn/1ba71c018b33ce807b35b10efcb5f748 to your computer and use it in GitHub Desktop.
from .tasks import longtime_add
import time
if __name__ == '__main__':
for _ in xrange(10):
result = longtime_add.delay(1,2)
print 'Task finished?',result.ready()
print 'Task result:',result.result
time.sleep(1)
print 'Task finished"',result.ready()
print 'Task result:',result.result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment