Read-only terminal UI dashboard for monitoring the ServeWorkflow service in real time. Launched as a standalone CLI command; it does not require the workflow service itself to be running.
WorkflowTUI connects to the RabbitMQ message queue and polls queue depth statistics every TuiConstants.WORKFLOW_POLL_SECS seconds. It renders a full-screen Rich Live layout with animated heartbeat, uptime, queue counters, a bar-chart queue status view, and a scrolling log pane.
Data source: ObjMessageQueue.status("axion", "workflow_{package}").
__init__(self)Initialises the theme, console, layout, and internal state. Creates the Live object but does not start it.
start(self)Starts the Live display and launches the background polling thread. Call this before blocking on _stop_event.
stop(self)Signals the polling thread to stop, joins it, and tears down the Live display. Always called in a finally block.
log(self, message: str, level: str = TuiLogLevel.INFO)Appends a timestamped log entry. Entries older than TuiConstants.LOG_MAX are discarded.
set_status(self, message: str)Updates the footer status line (thread-safe).
_poll_data(self) (internal)Polls ObjMessageQueue every WORKFLOW_POLL_SECS. Reads pending, staged, queued, and recent_completed counts and stores them under self.queue_stats.
| Panel | Content |
|---|---|
| Header | Heartbeat, package, uptime, clock |
| Sidebar | Pending / Staged / Queued / Completed counters |
| Queue Status | ASCII bar chart for each queue depth |
| Log | Scrolling timestamped log |
| Footer | Last status message |
python ServeWorkflow.py tui
Press Ctrl+C to exit.