MCPcopy Index your code
hub / github.com/tortoise/tortoise-orm / _close

Method _close

tortoise/backends/asyncpg/client.py:79–86  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 await self._pool.expire_connections()
78
79 async def _close(self) -> None:
80 if self._pool: # pragma: nobranch
81 try:
82 await asyncio.wait_for(self._pool.close(), 10)
83 except asyncio.TimeoutError: # pragma: nocoverage
84 self._pool.terminate()
85 self._pool = None
86 self.log.debug("Closed connection pool %s with params: %s", self._pool, self._template)
87
88 async def _translate_exceptions(self, func, *args, **kwargs) -> Exception:
89 try:

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected