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

Method _cleanup_stmts

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

Source from the content-addressed store, hash-verified

1639 self._stmts_to_close.add(stmt)
1640
1641 async def _cleanup_stmts(self):
1642 # Called whenever we create a new prepared statement in
1643 # `Connection._get_statement()` and `_stmts_to_close` is
1644 # not empty.
1645 to_close = self._stmts_to_close
1646 self._stmts_to_close = set()
1647 for stmt in to_close:
1648 # It is imperative that statements are cleaned properly,
1649 # so we ignore the timeout.
1650 await self._protocol.close_statement(stmt, protocol.NO_TIMEOUT)
1651
1652 async def _cancel(self, waiter):
1653 try:

Callers 1

_get_statementMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected