orka.startup.infrastructure.health module

Health Checking

This module provides health checking functionality for infrastructure services.

orka.startup.infrastructure.health.wait_for_services(backend: str) None[source]

Wait for infrastructure services to be ready.

Parameters:

backend – The backend type (‘redis’, ‘redisstack’, ‘kafka’, or ‘dual’)

async orka.startup.infrastructure.health.monitor_backend_process(backend_proc: Popen) None[source]

Monitor the backend process and detect if it stops unexpectedly.

Parameters:

backend_proc – The backend process to monitor

Raises:

RuntimeError – If the backend process stops unexpectedly

orka.startup.infrastructure.health.display_service_endpoints(backend: str) None[source]

Display service endpoints for the configured backend.

Parameters:

backend – The backend type (‘redis’, ‘redisstack’, ‘kafka’, or ‘dual’)

orka.startup.infrastructure.health.display_startup_success() None[source]

Display successful startup message.

orka.startup.infrastructure.health.display_shutdown_message() None[source]

Display graceful shutdown message.

orka.startup.infrastructure.health.display_shutdown_complete() None[source]

Display shutdown complete message.

orka.startup.infrastructure.health.display_error(error: Exception) None[source]

Display error message during startup.

Parameters:

error – The exception that occurred

orka.startup.infrastructure.health.check_process_health(processes: Dict[str, Popen]) bool[source]

Check the health of all managed processes.

Parameters:

processes – Dictionary of process name to process object

Returns:

True if all processes are healthy, False otherwise

Return type:

bool