A second bus subscriber folds executions, errors, timings and queue lag into per-minute rollups, keeps failures with their traceback and an audit trail of who published what, and records one row per cascade — manual runs and previews included, under an id of their own that writes no idempotency markers. Read back through /observability/*, which always answers 200 so a degraded engine still renders its own health screen. Also fixes two things found on the way: node-health alerts read `status` where the engine publishes `health`, so a device dropping never alerted anyone, and the Redis queue reported `parked: 0` whatever was held.
38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
from fastapi import APIRouter
|
|
|
|
from app.api.routes import (
|
|
alerts,
|
|
dashboards,
|
|
flows,
|
|
login,
|
|
messages,
|
|
modules,
|
|
oauth,
|
|
observability,
|
|
private,
|
|
secrets,
|
|
users,
|
|
utils,
|
|
)
|
|
|
|
api_router = APIRouter()
|
|
api_router.include_router(login.router)
|
|
api_router.include_router(users.router)
|
|
api_router.include_router(utils.router)
|
|
api_router.include_router(flows.router)
|
|
api_router.include_router(flows.ws_router)
|
|
api_router.include_router(secrets.router)
|
|
api_router.include_router(alerts.router)
|
|
api_router.include_router(dashboards.router)
|
|
api_router.include_router(messages.router)
|
|
api_router.include_router(modules.router)
|
|
api_router.include_router(observability.router)
|
|
# Always mounted so the generated SDK stays the same shape; the endpoints
|
|
# themselves refuse to work unless MCP is switched on.
|
|
api_router.include_router(oauth.router)
|
|
|
|
|
|
# Always mounted like oauth, so the generated SDK keeps its shape; the
|
|
# endpoints refuse to work unless the private API is explicitly enabled.
|
|
api_router.include_router(private.router)
|