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

Method __aexit__

tortoise/context.py:515–522  ·  view source on GitHub ↗

Exit the async context manager, close connections, and restore previous context.

(self, exc_type: Any, exc_val: Any, exc_tb: Any)

Source from the content-addressed store, hash-verified

513 return self
514
515 async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
516 """
517 Exit the async context manager, close connections, and restore previous context.
518 """
519 await self.close_connections()
520 self._apps = None
521 self._inited = False
522 self.__exit__(exc_type, exc_val, exc_tb)
523
524
525@asynccontextmanager

Callers 2

dbFunction · 0.45
db_postgresFunction · 0.45

Calls 2

close_connectionsMethod · 0.95
__exit__Method · 0.95

Tested by 2

dbFunction · 0.36
db_postgresFunction · 0.36