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

Method _cleanup_stmts

asyncpg/connection.py:1667–1676  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1665 self._stmts_to_close.add(stmt)
1666
1667 async def _cleanup_stmts(self):
1668 # Called whenever we create a new prepared statement in
1669 # `Connection._get_statement()` and `_stmts_to_close` is
1670 # not empty.
1671 to_close = self._stmts_to_close
1672 self._stmts_to_close = set()
1673 for stmt in to_close:
1674 # It is imperative that statements are cleaned properly,
1675 # so we ignore the timeout.
1676 await self._protocol.close_statement(stmt, protocol.NO_TIMEOUT)
1677
1678 async def _cancel(self, waiter, cancel_waiter=None):
1679 try:

Callers 1

_get_statementMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected