FlowNotFound says whether a published flow or any flow is missing; read_all stamps its cache with the revision from before its scan; dashboard discard and delete commits name the key; a RedisState ttl expires counters and the names set too; bench_startup publishes the version after its saves, and only when there is a draft

This commit is contained in:
2026-11-04 21:20:29 +01:00
parent b7f1d21712
commit eb17528ce6
5 changed files with 70 additions and 16 deletions
+9 -5
View File
@@ -96,11 +96,15 @@ def ensure_flow(api: Api) -> None:
api.call(
"PUT", f"/api/v1/flows/{BENCH_FLOW}/nodes/noop/source", {"code": NODE_SOURCE}
)
api.call(
"POST",
f"/api/v1/flows/{BENCH_FLOW}/publish",
{"version": definition["version"]},
)
# Read again, since the saves move the version. A flow an interrupted run
# left published, and unchanged since, has nothing to publish.
current = api.call("GET", f"/api/v1/flows/{BENCH_FLOW}")
if current["has_draft"]:
api.call(
"POST",
f"/api/v1/flows/{BENCH_FLOW}/publish",
{"version": current["definition"]["version"]},
)
def time_runs(api: Api, count: int) -> tuple[list[float], list[float]]: