Dashboard: ignore an old STOPPED.txt while a controller runs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Kral
2026-10-05 21:32:23 +02:00
parent 301c221d8e
commit dc8d99a913

View File

@@ -294,7 +294,9 @@ def render(d):
tasks_with_run = {r["task"] for r in rows} tasks_with_run = {r["task"] for r in rows}
backlog = sum(1 for l in logs if l.get("accepted") and l["id"] not in tasks_with_run) backlog = sum(1 for l in logs if l.get("accepted") and l["id"] not in tasks_with_run)
alive = any("harness.pipeline" in p for p in d["procs"]) alive = any("harness.pipeline" in p for p in d["procs"])
status, scls = ("RUNNING", "ok") if alive and not d["stopped"] else (("STOPPED", "er") if d["stopped"] else ("NOT RUNNING", "er")) if alive: # a STOPPED.txt of an earlier run does not count while a controller runs
d["stopped"] = None
status, scls = ("RUNNING", "ok") if alive else (("STOPPED", "er") if d["stopped"] else ("NOT RUNNING", "er"))
hints = sum(e["hints"] for e in evs) hints = sum(e["hints"] for e in evs)
ctx = sorted(e["ctx"] for e in acc if e["ctx"]) ctx = sorted(e["ctx"] for e in acc if e["ctx"])
next50 = (n_acc // 50 + 1) * 50 next50 = (n_acc // 50 + 1) * 50