orka.startup.backend module

Backend Server Management

This module handles OrKa backend server startup and management.

orka.startup.backend.start_backend(backend: str) Popen[source]

Start the OrKa backend server as a separate process.

This function launches the OrKa server module in a subprocess, allowing it to run independently while still being monitored by this parent process.

Parameters:

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

Returns:

The process object representing the running backend

Return type:

subprocess.Popen

Raises:

Exception – If the backend fails to start for any reason

orka.startup.backend.terminate_backend_process(backend_proc: Popen) None[source]

Gracefully terminate the backend process.

Parameters:

backend_proc – The backend process to terminate

orka.startup.backend.is_backend_running(backend_proc: Popen) bool[source]

Check if the backend process is still running.

Parameters:

backend_proc – The backend process to check

Returns:

True if the process is running, False otherwise

Return type:

bool