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

Method _on_release

asyncpg/connection.py:1812–1821  ·  view source on GitHub ↗
(self, stacklevel=1)

Source from the content-addressed store, hash-verified

1810 warnings.warn(w)
1811
1812 def _on_release(self, stacklevel=1):
1813 # Invalidate external references to the connection.
1814 self._pool_release_ctr += 1
1815 # Called when the connection is about to be released to the pool.
1816 # Let's check that the user has not left any listeners on it.
1817 self._check_listeners(
1818 list(itertools.chain.from_iterable(self._listeners.values())),
1819 'notification')
1820 self._check_listeners(
1821 self._log_listeners, 'log')
1822
1823 def _drop_local_statement_cache(self):
1824 self._stmt_cache.clear()

Callers 1

releaseMethod · 0.80

Calls 1

_check_listenersMethod · 0.95

Tested by

no test coverage detected