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

Method _wrapper

src/quart/app.py:1371–1376  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1369
1370 def add_background_task(self, func: Callable, *args: Any, **kwargs: Any) -> None:
1371 async def _wrapper() -> None:
1372 try:
1373 async with self.app_context():
1374 await self.ensure_async(func)(*args, **kwargs)
1375 except Exception as error:
1376 await self.handle_background_exception(error)
1377
1378 task = asyncio.get_event_loop().create_task(_wrapper())
1379 self.background_tasks.add(task)

Callers

nothing calls this directly

Calls 3

app_contextMethod · 0.95
ensure_asyncMethod · 0.95

Tested by

no test coverage detected