MCPcopy Create free account
hub / github.com/openai/openai-agents-python / _container_running

Function _container_running

examples/memory/dapr_session_example.py:445–459  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

443
444
445def _container_running(name: str):
446 if not _docker_available():
447 return None
448 try:
449 result = subprocess.run(
450 ["docker", "inspect", "-f", "{{.State.Running}}", name],
451 check=False,
452 capture_output=True,
453 text=True,
454 )
455 if result.returncode != 0:
456 return None
457 return result.stdout.strip().lower() == "true"
458 except Exception:
459 return None
460
461
462def _ensure_container(name: str, run_args: list[str]) -> None:

Callers 1

_ensure_containerFunction · 0.85

Calls 2

_docker_availableFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected