MCPcopy
hub / github.com/tortoise/tortoise-orm / main

Function main

tortoise/__init__.py:576–582  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

574 from tortoise.context import get_current_context
575
576 async def main() -> None:
577 try:
578 await coro
579 finally:
580 ctx = get_current_context()
581 if ctx is not None:
582 await ctx.connections.close_all(discard=True)
583
584 with from_thread.start_blocking_portal() as portal:
585 portal.call(main)

Callers

nothing calls this directly

Calls 2

get_current_contextFunction · 0.90
close_allMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…