From 01cf4dbcc70864e1499a822df81c3898962c1360 Mon Sep 17 00:00:00 2001 From: rorour Date: Tue, 18 Jul 2023 18:26:50 -0600 Subject: [PATCH] fix #6073: purge_non_premium needs to ignore UserDirNotFound --- sirepo/job_supervisor.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sirepo/job_supervisor.py b/sirepo/job_supervisor.py index 80bba9bde0..601592c5ac 100644 --- a/sirepo/job_supervisor.py +++ b/sirepo/job_supervisor.py @@ -176,7 +176,7 @@ def init_module(**imports): purge_non_premium_task_secs=( None, pkconfig.parse_seconds, - "when to clean up simulation runs of non-premium users (%H:%M:%S)", + "time interval to clean up simulation runs of non-premium users (%H:%M:%S)", ), sbatch_poll_secs=(15, int, "how often to poll squeue and parallel status"), ) @@ -518,8 +518,12 @@ def _purge_job(jid, qcall): d.simulationType ): return - p = sirepo.simulation_db.simulation_run_dir(d, qcall=qcall) - pkio.unchecked_remove(p) + try: + pkio.unchecked_remove( + sirepo.simulation_db.simulation_run_dir(d, qcall=qcall) + ) + except sirepo.util.UserDirNotFound: + pass n = cls.__db_init_new(d, d) n.status = job.JOB_RUN_PURGED cls.__db_write_file(n)