jumpserver/apps/ops/run_tasks.py

9 lines
246 B
Python
Raw Normal View History

2016-09-03 11:05:50 +00:00
from .tasks import longtime_add
import time
result = longtime_add.delay(1,2)
print 'Task finished? ', result.ready()
print 'Task result: ', result.result
time.sleep(10)
print 'Task finished? ', result.ready()
print 'Task result: ', result.result