Skip to content
Snippets Groups Projects
Commit 4d2506af authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Put reports from recorrection in proposal usr folder

parent 4967a143
No related branches found
No related tags found
1 merge request!695[webservice] Support requests to repeat correction from myMdC
...@@ -936,13 +936,13 @@ class ActionsServer: ...@@ -936,13 +936,13 @@ class ActionsServer:
return queued_msg.encode() return queued_msg.encode()
async def handle_repeat(self, rid, instrument, cycle, proposal, runnr): async def handle_repeat(self, rid, instrument, cycle, proposal, runnr):
request_time = datetime.now().strftime('%Y-%m-%dT%H:%M:%S') request_time = datetime.now()
try: try:
with self.job_db: with self.job_db:
cur = self.job_db.execute( cur = self.job_db.execute(
"INSERT INTO requests VALUES (NULL, ?, ?, ?, 'CORRECT', ?)", "INSERT INTO requests VALUES (NULL, ?, ?, ?, 'CORRECT', ?)",
(rid, proposal, int(runnr), request_time) (rid, proposal, int(runnr), request_time.strftime('%Y-%m-%dT%H:%M:%S'))
) )
req_id = cur.lastrowid req_id = cur.lastrowid
...@@ -1005,7 +1005,9 @@ class ActionsServer: ...@@ -1005,7 +1005,9 @@ class ActionsServer:
cmd = [ cmd = [
'python', '-m', 'xfel_calibrate.repeat', str(mddir), 'python', '-m', 'xfel_calibrate.repeat', str(mddir),
'--env-cache', '--env-cache',
f'/gpfs/exfel/data/scratch/{getuser()}/calib-repeat-envs' f'/gpfs/exfel/data/scratch/{getuser()}/calib-repeat-envs',
'--report-path',
f'{reports_dir}/{karabo_id}_RECORRECT_{request_time:%y%m%d_%H%M%S}'
] ]
with self.job_db: with self.job_db:
......
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