Skip to content
Snippets Groups Projects

[Webservice] Don't mark jobs as finished just because they disappear from squeue output

Merged Thomas Kluyver requested to merge fix/jobmon-slurm-finish-states into master
2 unresolved threads
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -25,7 +25,7 @@ log = logging.getLogger(__name__)
@@ -25,7 +25,7 @@ log = logging.getLogger(__name__)
STATES_FINISHED = { # https://slurm.schedmd.com/squeue.html#lbAG
STATES_FINISHED = { # https://slurm.schedmd.com/squeue.html#lbAG
'BOOT_FAIL', 'CANCELLED', 'COMPLETED', 'DEADLINE', 'FAILED',
'BOOT_FAIL', 'CANCELLED', 'COMPLETED', 'DEADLINE', 'FAILED',
'OUT_OF_MEMORY', 'PREEMPTED', 'SPECIAL_EXIT', 'TIMEOUT',
'OUT_OF_MEMORY', 'SPECIAL_EXIT', 'TIMEOUT',
}
}
@@ -55,7 +55,7 @@ def slurm_status(filter_user=True):
@@ -55,7 +55,7 @@ def slurm_status(filter_user=True):
:return: a dictionary indexed by slurm jobid and containing a tuple
:return: a dictionary indexed by slurm jobid and containing a tuple
of (status, run time) as values.
of (status, run time) as values.
"""
"""
cmd = ["squeue"]
cmd = ["squeue", "--states=all"]
if filter_user:
if filter_user:
cmd += ["--me"]
cmd += ["--me"]
res = run(cmd, stdout=PIPE, stderr=PIPE)
res = run(cmd, stdout=PIPE, stderr=PIPE)
Loading