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

Method _setup_inactive_callback

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

Source from the content-addressed store, hash-verified

274 self._con.terminate()
275
276 def _setup_inactive_callback(self) -> None:
277 if self._inactive_callback is not None:
278 raise exceptions.InternalClientError(
279 'pool connection inactivity timer already exists')
280
281 if self._max_inactive_time:
282 self._inactive_callback = self._pool._loop.call_later(
283 self._max_inactive_time, self._deactivate_inactive_connection)
284
285 def _maybe_cancel_inactive_callback(self) -> None:
286 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