Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
robnagler committed Dec 24, 2024
1 parent 06bf7f5 commit 5985602
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions sirepo/pkcli/job_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ async def _reply_error(msg):
async def _fastcgi_op(self, msg):
if msg.runDir:
_assert_run_dir_exists(pkio.py_path(msg.runDir))
pkdp([msg, self.fastcgi_cmd])
pkdp([msg.get("job_cmd"), self.fastcgi_cmd, self.get("_fastcgi_msg_q")])
if not self.fastcgi_cmd:
m = copy.deepcopy(msg)
m.jobCmd = "fastcgi"
Expand All @@ -405,18 +405,18 @@ async def _fastcgi_op(self, msg):
)
# last thing, because of await: start fastcgi process
await self._cmd(m, send_reply=False)
pkdp([self.fastcgi_cmd])
pkdp([self.fastcgi_cmd, self.get("_fastcgi_msg_q")])
if not self._fastcgi_msg_q:
pkdp([msg, self.fastcgi_cmd])
pkdp([self.fastcgi_cmd])
return self.format_op(
msg,
job.ERROR,
PKDict(state=job.ERROR, error="fastcgi process got an error"),
)
pkdp([msg, self.fastcgi_cmd, self._fastcgi_msg_q])
pkdp([self.fastcgi_cmd, self._fastcgi_msg_q])
if msg.jobCmd == "fastcgi":
raise AssertionError("fastcgi called within fastcgi")
pkdp([msg, self.fastcgi_cmd, self._fastcgi_msg_q])
pkdp([self.fastcgi_cmd, self._fastcgi_msg_q])
self._fastcgi_msg_q.put_nowait(msg)
# For better logging, msg.opId is used in format_op (reply)
# Also used in op_cancel so a cancel, cancels the fastcgi process
Expand Down Expand Up @@ -1133,15 +1133,13 @@ def _scancel(sbatch_id):

if self._destroying:
return
self._destroying = True
self._terminating = terminating
if self._sbatch_status_cb:
self._sbatch_status_cb.stop()
self._sbatch_status_cb = None
if (
self._sbatch_status.job_cmd_state not in job.JOB_CMD_STATE_EXITS
and self._sbatch_status.sbatch_id
and not self._terminating
and not terminating
):
self._sbatch_status_update(job_cmd_state=job.CANCELED)
_scancel(self._sbatch_status.sbatch_id)
Expand Down

0 comments on commit 5985602

Please sign in to comment.