from .tasks import longtime_add
import time


if __name__ == '__main__':
    result = longtime_add.delay(1,2)
    # Task not finished, will return False
    print 'Task finished?', result.ready()
    print 'Task result: ', result.result

    time.sleep(10)
    # Task finished, will return True
    print 'Task finished?', result.ready()
    print 'Task result: ', result.result
eb17e50c902261342523e5c6ecbe54492c8e589d
from .tasks import longtime_add
import time


if __name__ == '__main__':
    result = longtime_add.delay(1,2)
    # Task not finished, will return False
    print 'Task finished?', result.ready()
    print 'Task result: ', result.result

    time.sleep(10)
    # Task finished, will return True
    print 'Task finished?', result.ready()
    print 'Task result: ', result.result