MCPcopy
hub / github.com/psycopg/psycopg / maintain_gen

Method maintain_gen

psycopg/psycopg/_preparing.py:184–193  ·  view source on GitHub ↗

Generator to send the commands to perform periodic maintenance Deallocate unneeded command in the server, or flush the prepared statements server state entirely if necessary.

(self, conn: BaseConnection[Any])

Source from the content-addressed store, hash-verified

182 return False
183
184 def maintain_gen(self, conn: BaseConnection[Any]) -> PQGen[None]:
185 """
186 Generator to send the commands to perform periodic maintenance
187
188 Deallocate unneeded command in the server, or flush the prepared
189 statements server state entirely if necessary.
190 """
191 while self._to_flush:
192 name = self._to_flush.popleft()
193 yield from conn._deallocate(name)

Callers 5

_execute_genMethod · 0.80
_rollback_genMethod · 0.80
_rollback_genMethod · 0.80

Calls 1

_deallocateMethod · 0.80

Tested by

no test coverage detected