event_bridge
event_bridge
¶
Daemon EventBus → SSE bridge for real-time event streaming.
Subscribes to daemon.monitor.stream via DaemonClient.stream() and
multiplexes events to per-job and global consumers. Replaces the previous
polling approach with a single long-lived subscription to the conductor's
EventBus.
Classes¶
DaemonEventBridge
¶
Bridge between daemon EventBus and browser SSE streams.
Maintains a single daemon.monitor.stream subscription that feeds
per-job queues and a global queue. Consumers (SSE routes) await
their queue — no polling needed.
Parameters¶
client:
Connected DaemonClient for IPC calls.
Source code in src/marianne/dashboard/services/event_bridge.py
Functions¶
start
async
¶
Start the background subscription to the conductor event stream.
Source code in src/marianne/dashboard/services/event_bridge.py
stop
async
¶
Stop the background subscription and clean up.
Source code in src/marianne/dashboard/services/event_bridge.py
job_events
async
¶
Yield real-time SSE events for a specific job.
Creates a per-job queue, subscribes to the conductor event stream, and yields events as they arrive.
Source code in src/marianne/dashboard/services/event_bridge.py
all_events
async
¶
Yield real-time SSE events across all jobs.
Used by the global event timeline on the dashboard index page.
Source code in src/marianne/dashboard/services/event_bridge.py
observer_events
async
¶
Get recent observer events for a job (one-shot, not streaming).
Falls back to IPC call for historical events.