Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #6073: purge_non_premium needs to ignore UserDirNotFound #6130

Merged
merged 3 commits into from
Jul 19, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions sirepo/job_supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
rorour marked this conversation as resolved.
Show resolved Hide resolved
),
sbatch_poll_secs=(15, int, "how often to poll squeue and parallel status"),
)
Expand Down Expand Up @@ -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)
Expand Down