MCPcopy
hub / github.com/psycopg/psycopg / worker

Function worker

tests/pool/test_pool_async.py:434–439  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

432 delay_connection(monkeypatch, 0.1)
433
434 async def worker(n):
435 t0 = time()
436 async with p.connection() as conn:
437 await conn.execute("select 1 from pg_sleep(0.25)")
438 t1 = time()
439 results.append((n, t1 - t0))
440
441 async with pool.AsyncConnectionPool(
442 dsn, min_size=min_size, max_size=4, num_workers=3

Callers

nothing calls this directly

Calls 6

asleepFunction · 0.50
connectionMethod · 0.45
executeMethod · 0.45
infoMethod · 0.45
fetchoneMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected