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

Store xfel-calibrate command in jobs database

parent 0b847163
No related branches found
No related tags found
1 merge request!683[Webservice] Restructure database to give more meaningful success/failure information
......@@ -59,6 +59,7 @@ def init_job_db(config):
CREATE TABLE IF NOT EXISTS executions(
exec_id INTEGER PRIMARY KEY,
req_id REFERENCES requests(req_id),
command TEXT,
det_type,
karabo_id,
success
......@@ -1170,15 +1171,16 @@ class ActionsServer:
time_stamp=datetime.now().strftime('%y%m%d_%H%M%S'),
det_instance=karabo_id,
request_time=request_time
).split()
)
with self.job_db:
cur = self.job_db.execute(
"INSERT INTO executions VALUES (NULL, ?, ?, ?, NULL)",
(req_id, detector, karabo_id)
"INSERT INTO executions VALUES (NULL, ?, ?, ?, ?, NULL)",
(req_id, cmd, detector, karabo_id)
)
exec_id = cur.lastrowid
cmd = cmd.split()
cmd = parse_config(cmd, dconfig)
# TODO: Add detector info in returned run action status.
ret.append(await run_action(
......
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