Count flows rather than nodes in the health report
is keyed by node id, so a four-node flow reported four flows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011LF61rxW1FG5YCD2J9YqjY
This commit is contained in:
@@ -69,7 +69,9 @@ async def health(request: Request, response: Response) -> dict[str, Any]:
|
|||||||
redis_info["rtt_ms"] = round((time.perf_counter() - start) * 1000, 1)
|
redis_info["rtt_ms"] = round((time.perf_counter() - start) * 1000, 1)
|
||||||
if not connected:
|
if not connected:
|
||||||
problems.append("redis unreachable")
|
problems.append("redis unreachable")
|
||||||
engine["flows"] = len(getattr(controller, "loaded", {}) or {})
|
# `loaded` is keyed by node id, so its length is a node count.
|
||||||
|
loaded = getattr(controller, "loaded", {}) or {}
|
||||||
|
engine["flows"] = len({entry.flow for entry in loaded.values()})
|
||||||
engine["nodes"] = len(
|
engine["nodes"] = len(
|
||||||
getattr(getattr(controller, "pipeline", None), "nodes", []) or []
|
getattr(getattr(controller, "pipeline", None), "nodes", []) or []
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user