MCPcopy
hub / github.com/openai/openai-agents-python / run

Function run

tests/extensions/memory/test_sqlalchemy_session.py:398–409  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

396
397 def worker(session_id: str, content: str) -> None:
398 async def run() -> tuple[str, Any]:
399 session = SQLAlchemySession.from_url(session_id, url=db_url, create_tables=True)
400 barrier.wait()
401 try:
402 await asyncio.wait_for(
403 session.add_items([{"role": "user", "content": content}]),
404 timeout=5,
405 )
406 stored = await session.get_items()
407 return ("ok", stored)
408 finally:
409 await session.engine.dispose()
410
411 try:
412 status, payload = asyncio.run(run())

Callers 1

workerFunction · 0.70

Calls 4

from_urlMethod · 0.45
waitMethod · 0.45
add_itemsMethod · 0.45
get_itemsMethod · 0.45

Tested by

no test coverage detected