Skip to content
Snippets Groups Projects
Commit b1d13ce9 authored by Karim Ahmed's avatar Karim Ahmed
Browse files

return collective string for all detectors in run action

parent e62c3dbe
No related branches found
No related tags found
1 merge request!482[webservice] fix/submit jobs for multiple detectors in the same run.
......@@ -1163,6 +1163,9 @@ class ActionsServer:
self, run_nrs, rid, detectors, action, instrument, cycle, proposal,
request_time
) -> (str, Optional[str]):
report = ""
ret = ""
delim = ", "
# run xfel_calibrate
for karabo_id, dconfig in detectors.items():
detector = dconfig['detector-type']
......@@ -1179,16 +1182,18 @@ class ActionsServer:
).split()
cmd = parse_config(cmd, dconfig)
ret = await run_action(self.job_db, cmd, self.mode,
proposal, run_nrs[-1], rid)
# TODO: Add detector info in returned run action status.
ret += (
await run_action(
self.job_db, cmd, self.mode,
proposal, run_nrs[-1], rid
) + delim
)
if '--report-to' in cmd[:-1]:
report_idx = cmd.index('--report-to') + 1
report = cmd[report_idx] + '.pdf'
else:
report = None
return ret, report
report += cmd[report_idx] + '.pdf' + delim
# return string without a tailing comma.
return ret[:-2], report[:-2] if report != delim else None
parser = argparse.ArgumentParser(
description='Start the calibration webservice')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment