Keep running jobs visible when the job list is cleared

This commit is contained in:
Justin Oros
2026-09-21 14:53:56 -07:00
parent 2c5a1599c2
commit 82269d66f6
+3 -2
View File
@@ -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)