MCPcopy Create free account
hub / github.com/python-arq/arq / poll

Function poll

arq/utils.py:101–109  ·  view source on GitHub ↗
(step: float = 0.5)

Source from the content-addressed store, hash-verified

99
100
101async def poll(step: float = 0.5) -> AsyncGenerator[float, None]:
102 loop = asyncio.get_running_loop()
103 start = loop.time()
104 while True:
105 before = loop.time()
106 yield before - start
107 after = loop.time()
108 wait = max([0, step - after + before])
109 await asyncio.sleep(wait)
110
111
112DEFAULT_CURTAIL = 80

Callers 2

resultMethod · 0.85
mainMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…