Skip to content
Merged
Changes from 1 commit
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: 5 additions & 5 deletions eessi_bot_job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,18 +305,18 @@ def process_new_job(self, new_job):

# processing placeholders in scontrol command which is defined in the bot's app.cfg (setting `scontrol_command`)
try:
self.scontrol_command = self.scontrol_command % new_job
templated_scontrol_command = self.scontrol_command % new_job
except KeyError:
log(f"Failed to process {self.scontrol_command}.")
log(f"Information on placeholder is not collected in new_job: {new_job}.")
raise

scontrol_cmd = "%s --oneliner show jobid %s" % (
self.scontrol_command,
cmd = "%s --oneliner show jobid %s" % (
templated_scontrol_command,
job_id,
)
scontrol_output, scontrol_err, scontrol_exitcode = run_cmd(
scontrol_cmd,
cmd,
"process_new_job(): scontrol command",
log_file=self.logfile,
)
Expand Down Expand Up @@ -366,7 +366,7 @@ def process_new_job(self, new_job):
extra_info = ''
if self.job_handover_protocol == config.JOB_HANDOVER_PROTOCOL_HOLD_RELEASE:
release_cmd = "%s release %s" % (
self.scontrol_command,
templated_scontrol_command,
job_id,
)

Expand Down