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

Function the_task

docs/examples/sync_job.py:9–12  ·  view source on GitHub ↗
(ctx, t)

Source from the content-addressed store, hash-verified

7 return time.sleep(t)
8
9async def the_task(ctx, t):
10 blocking = functools.partial(sync_task, t)
11 loop = asyncio.get_running_loop()
12 return await loop.run_in_executor(ctx['pool'], blocking)
13
14async def startup(ctx):
15 ctx['pool'] = futures.ProcessPoolExecutor()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…