예제 #1
0
 def helper_test_get_delay(result):
     import time
     t0 = time.time()
     while not result.ready():
         time.sleep(0.01)
         if time.time() - t0 > 1:
             return None
     return result.get()
예제 #2
0
파일: test_canvas.py 프로젝트: Scalr/celery
 def helper_test_get_delay(result):
     import time
     t0 = time.time()
     while not result.ready():
         time.sleep(0.01)
         if time.time() - t0 > 1:
             return None
     return result.get()