MCPcopy Index your code
hub / github.com/MagicStack/asyncpg / get_idle_size

Method get_idle_size

asyncpg/pool.py:506–511  ·  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

504 return self._maxsize
505
506 def get_idle_size(self):
507 """Return the current number of idle connections in this pool.
508
509 .. versionadded:: 0.25.0
510 """
511 return sum(h.is_connected() and h.is_idle() for h in self._holders)
512
513 def set_connect_args(self, dsn=None, **connect_kwargs):
514 r"""Set the new connection arguments for this pool.

Callers 1

Calls 2

is_connectedMethod · 0.80
is_idleMethod · 0.80

Tested by 1