Skip to content

Commit

Permalink
Merge pull request #219 from cmd-ntrf/log
Browse files Browse the repository at this point in the history
Improve submit_batch_script logging
  • Loading branch information
consideRatio authored Mar 16, 2024
2 parents f7de5ad + 9fc2a83 commit fdd25e9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions batchspawner/batchspawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,16 @@ async def submit_batch_script(self):
if hasattr(self, "user_options"):
subvars.update(self.user_options)
script = await self._get_batch_script(**subvars)
self.log.info("Spawner submitting job using " + cmd)
self.log.info("Spawner submitted script:\n" + script)
self.log.info("Spawner script options: %s", subvars)
self.log.info("Spawner submitting command: %s", cmd)
self.log.debug("Spawner submitting script:\n%s", script)
self.log.debug("Spawner submitting environment: %s", self.get_env())
out = await self.run_command(cmd, input=script, env=self.get_env())
try:
self.log.info("Job submitted. cmd: " + cmd + " output: " + out)
self.log.info("Job submitted. output: %s", out)
self.job_id = self.parse_job_id(out)
except:
self.log.error("Job submission failed with exit code " + out)
self.log.error("Job submission failed. exit code: %s", out)
self.job_id = ""
return self.job_id

Expand Down

0 comments on commit fdd25e9

Please sign in to comment.