MCPcopy Index your code
hub / github.com/fastapi/fastapi / get_sync_context_b_bg

Function get_sync_context_b_bg

tests/test_dependency_contextmanager.py:194–203  ·  view source on GitHub ↗
(
    tasks: BackgroundTasks, state: dict = Depends(context_b)
)

Source from the content-addressed store, hash-verified

192
193@app.get("/sync_context_b_bg")
194async def get_sync_context_b_bg(
195 tasks: BackgroundTasks, state: dict = Depends(context_b)
196):
197 async def bg(state: dict):
198 state["sync_bg"] = (
199 f"sync_bg set - b: {state['context_b']} - a: {state['context_a']}"
200 )
201
202 tasks.add_task(bg, state)
203 return state
204
205
206@app.middleware("http")

Callers

nothing calls this directly

Calls 2

DependsClass · 0.90
add_taskMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…