MCPcopy
hub / github.com/MagicStack/asyncpg / _on_release

Method _on_release

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

Source from the content-addressed store, hash-verified

1779 warnings.warn(w)
1780
1781 def _on_release(self, stacklevel=1):
1782 # Invalidate external references to the connection.
1783 self._pool_release_ctr += 1
1784 # Called when the connection is about to be released to the pool.
1785 # Let's check that the user has not left any listeners on it.
1786 self._check_listeners(
1787 list(itertools.chain.from_iterable(self._listeners.values())),
1788 'notification')
1789 self._check_listeners(
1790 self._log_listeners, 'log')
1791
1792 def _drop_local_statement_cache(self):
1793 self._stmt_cache.clear()

Callers 1

releaseMethod · 0.80

Calls 1

_check_listenersMethod · 0.95

Tested by

no test coverage detected