From 82269d66f62358b51c05e53616be475044b51c90 Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Mon, 21 Sep 2026 14:53:56 -0700 Subject: [PATCH] Keep running jobs visible when the job list is cleared --- app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index c68f485..7bf64c1 100644 --- a/app.py +++ b/app.py @@ -2022,9 +2022,10 @@ async def api_pull_model(request: Request): def api_clear_history(): with state_lock: st = load_state() - count = len(st["history"]) + keep = [h for h in st["history"] if h.get("status") == "running"] + count = len(st["history"]) - len(keep) if count: - st["history"] = [] + st["history"] = keep save_state(st) if count: logger.info("Cleared %d jobs from the list", count)