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

Fix parameter orders

parent 8c7029eb
No related branches found
No related tags found
1 merge request!436Webservice: use SQLite parameter substitution instead of string formatting
......@@ -348,7 +348,7 @@ async def update_job_db(config):
else:
_, sltime, slstatus = await slurm_job_status(jobid)
query = "UPDATE jobs SET status=? WHERE jobid LIKE ?"
c.execute(query, (jobid, slstatus))
c.execute(query, (slstatus, jobid))
if slstatus == 'COMPLETED':
cflg.append("A")
......@@ -434,7 +434,7 @@ async def run_action(job_db, cmd, mode, proposal, run, rid):
if "Submitted job:" in r:
_, jobid = r.split(":")
c.execute(
"INSERT INTO jobs VALUES (?, ?, ?, ?, ?, 'PD', ?, ?)",
"INSERT INTO jobs VALUES (?, ?, ?, ?, 'PD', ?, ?, ?)",
(rid, jobid.strip(), proposal, run,
datetime.now().isoformat(), cmd[3], cmd[4])
)
......
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