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

Method _setup_inactive_callback

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

Source from the content-addressed store, hash-verified

310 self._con.terminate()
311
312 def _setup_inactive_callback(self) -> None:
313 if self._inactive_callback is not None:
314 raise exceptions.InternalClientError(
315 'pool connection inactivity timer already exists')
316
317 if self._max_inactive_time:
318 self._inactive_callback = self._pool._loop.call_later(
319 self._max_inactive_time, self._deactivate_inactive_connection)
320
321 def _maybe_cancel_inactive_callback(self) -> None:
322 if self._inactive_callback is not None:

Callers 2

connectMethod · 0.95
releaseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected