MCPcopy
hub / github.com/encode/starlette / endpoint_with_background_task

Function endpoint_with_background_task

tests/middleware/test_base.py:281–282  ·  view source on GitHub ↗
(_: Request)

Source from the content-addressed store, hash-verified

279 background_task_run.set()
280
281 async def endpoint_with_background_task(_: Request) -> PlainTextResponse:
282 return PlainTextResponse(background=BackgroundTask(sleep_and_set))
283
284 async def passthrough(
285 request: Request,

Callers

nothing calls this directly

Calls 2

PlainTextResponseClass · 0.90
BackgroundTaskClass · 0.90

Tested by

no test coverage detected