Update Python tools

This commit is contained in:
ajp_anton
2026-08-09 05:06:33 +00:00
parent 6d28257b54
commit 0dfb493ae1
3 changed files with 18 additions and 6 deletions
+7 -2
View File
@@ -121,8 +121,13 @@ class RunManager:
run = self.store.get(int(run_id_text))
if kind == "uploads" and (run is None or run.status not in {"queued", "running"}):
shutil.rmtree(path, ignore_errors=True)
elif kind == "artifacts" and path.stat().st_mtime < cutoff:
shutil.rmtree(path, ignore_errors=True)
elif kind == "artifacts":
try:
expired = path.stat().st_mtime < cutoff
except FileNotFoundError:
continue
if expired:
shutil.rmtree(path, ignore_errors=True)
def run_background_task(self, task: BackgroundTask) -> None:
"""Run a declared internal task without creating high-volume run history."""