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

Method get_idle_size

asyncpg/pool.py:623–628  ·  view source on GitHub ↗

Return the current number of idle connections in this pool. .. versionadded:: 0.25.0

(self)

Source from the content-addressed store, hash-verified

621 return self._maxsize
622
623 def get_idle_size(self):
624 """Return the current number of idle connections in this pool.
625
626 .. versionadded:: 0.25.0
627 """
628 return sum(h.is_connected() and h.is_idle() for h in self._holders)
629
630 def set_connect_args(self, dsn=None, **connect_kwargs):
631 r"""Set the new connection arguments for this pool.

Callers 1

Calls 2

is_connectedMethod · 0.80
is_idleMethod · 0.80

Tested by 1