MCPcopy Create free account
hub / github.com/google/adk-python / worker

Method worker

src/google/adk/cli/api_server.py:1477–1491  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1475 )
1476
1477 async def worker():
1478 try:
1479 async with Aclosing(
1480 runner.run_async(
1481 user_id=req.user_id,
1482 session_id=req.session_id,
1483 new_message=req.new_message,
1484 state_delta=req.state_delta,
1485 invocation_id=req.invocation_id,
1486 run_config=run_config,
1487 )
1488 ) as agen:
1489 return [event async for event in agen]
1490 except SessionNotFoundError as e:
1491 raise HTTPException(status_code=404, detail=str(e)) from e
1492
1493 worker_task = asyncio.create_task(worker())
1494

Callers

nothing calls this directly

Calls 1

run_asyncMethod · 0.45

Tested by

no test coverage detected