MCPcopy Create free account
hub / github.com/pallets/quart / startup

Method startup

src/quart/app.py:1763–1778  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1761 await asgi_handler(receive, send)
1762
1763 async def startup(self) -> None:
1764 self.shutdown_event = self.event_class()
1765 try:
1766 async with self.app_context():
1767 for func in self.before_serving_funcs:
1768 await self.ensure_async(func)()
1769 for gen in self.while_serving_gens:
1770 await gen.__anext__()
1771 except Exception as error:
1772 await got_serving_exception.send_async(
1773 self,
1774 _sync_wrapper=self.ensure_async, # type: ignore[arg-type]
1775 exception=error,
1776 )
1777 self.log_exception(sys.exc_info())
1778 raise
1779
1780 async def shutdown(self) -> None:
1781 self.shutdown_event.set()

Callers 1

__call__Method · 0.45

Calls 4

app_contextMethod · 0.95
ensure_asyncMethod · 0.95
log_exceptionMethod · 0.95
__anext__Method · 0.45

Tested by

no test coverage detected