MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / get_disconnected_nowait

Method get_disconnected_nowait

asyncpg/pool.py:37–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35 return super()._get()
36
37 def get_disconnected_nowait(self):
38 for i in range(len(self._queue) - 1, -1, -1):
39 if not self._queue[i].is_connected():
40 holder = self._queue.pop(i)
41 self._wakeup_next(self._putters)
42 return holder
43 raise asyncio.QueueEmpty
44
45
46class PoolConnectionProxyMeta(type):

Callers 1

_maintain_min_sizeMethod · 0.80

Calls 1

is_connectedMethod · 0.80

Tested by

no test coverage detected