From 7f701210f1a2cc137273b2cdb708868fe3653011 Mon Sep 17 00:00:00 2001 From: "William (Bill) E. Allcock" <weallcock@gmail.com> Date: Wed, 9 Feb 2022 15:57:11 -0600 Subject: [PATCH] debug changes --- hook_job_cleanup.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hook_job_cleanup.py b/hook_job_cleanup.py index 64dbe4f..192dfc5 100644 --- a/hook_job_cleanup.py +++ b/hook_job_cleanup.py @@ -11,6 +11,7 @@ try: j = e.job jobid = str(j.jobid) username = str(j.euser) + pbs.logmsg(pbs.LOG_DEBUG,f"TESTING mom_node_cleanup - IGNORE ME: {jobid},{username}") if e.type == pbs.EXECJOB_PROLOGUE: op = "-p" @@ -19,11 +20,15 @@ try: op = "-e" which = "EXECJOB_EPILOGUE" else: - e.reject(f"The cleanup script should only be called from the execjob_[prologue|epilogue] events; It was called from {e.type}") + message = f"The cleanup script should only be called from the execjob_[prologue|epilogue] events; It was called from {e.type}" + pbs.logmsg(pbs.LOG_DEBUG,message) +# e.reject(message) # tool = "clean-node.sh" tool = "/usr/bin/logger" subprocess.run([tool, op, jobid, username], timeout = 10, shell = False) e.accept() except Exception as ex: - e.reject(f"hook_job_cleanup.py threw an exception on jobid {jobid} for user {username}: {ex}") + message = f"hook_job_cleanup.py threw an exception on jobid {jobid} for user {username}: {ex}" + pbs.logmsg(pbs.LOG_DEBUG,message) +# e.reject(message) -- GitLab