MCPcopy
hub / github.com/fastapi/fastapi / get_context_b_bg

Function get_context_b_bg

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

Source from the content-addressed store, hash-verified

134
135@app.get("/context_b_bg")
136async def get_context_b_bg(tasks: BackgroundTasks, state: dict = Depends(context_b)):
137 async def bg(state: dict):
138 state["bg"] = f"bg set - b: {state['context_b']} - a: {state['context_a']}"
139
140 tasks.add_task(bg, state)
141 return state
142
143
144# Sync versions

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…