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

Method _get

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

Source from the content-addressed store, hash-verified

29 """Prefer live connections, with LIFO ordering within each group."""
30
31 def _get(self):
32 for i in range(len(self._queue) - 1, -1, -1):
33 if self._queue[i].is_connected():
34 return self._queue.pop(i)
35 return super()._get()
36
37 def get_disconnected_nowait(self):
38 for i in range(len(self._queue) - 1, -1, -1):

Callers

nothing calls this directly

Calls 1

is_connectedMethod · 0.80

Tested by

no test coverage detected