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

Convert job_ids to str for dict from slurm_status()

parent 0845d450
No related branches found
No related tags found
1 merge request!683[Webservice] Restructure database to give more meaningful success/failure information
......@@ -148,12 +148,12 @@ class JobsMonitor:
ongoing_jobs_by_exn = {}
for r in c.fetchall():
log.debug(f"DB info {r}")
log.debug(f"Job in DB before update: %s", tuple(r))
execn_ongoing_jobs = ongoing_jobs_by_exn.setdefault(r['exec_id'], [])
if r['job_id'] in statii:
if str(r['job_id']) in statii:
# statii contains jobs which are still going (from squeue)
slstatus, runtime = statii[r['job_id']]
slstatus, runtime = statii[str(r['job_id'])]
finished = False
execn_ongoing_jobs.append(f"{slstatus}-{runtime}")
......
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