MCPcopy Create free account
hub / github.com/celery/celery / _wait_until

Function _wait_until

t/smoke/tests/test_query_task.py:8–14  ·  view source on GitHub ↗
(predicate, timeout=RESULT_TIMEOUT, interval=0.5)

Source from the content-addressed store, hash-verified

6
7
8def _wait_until(predicate, timeout=RESULT_TIMEOUT, interval=0.5):
9 deadline = time.monotonic() + timeout
10 result = predicate()
11 while not result and time.monotonic() < deadline:
12 time.sleep(interval)
13 result = predicate()
14 return result
15
16
17class test_query_task:

Calls 2

predicateFunction · 0.85
sleepMethod · 0.45

Tested by

no test coverage detected