File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ def get_current_jobs(self):
106106 if username is None :
107107 raise Exception ("Unable to find username" )
108108
109- squeue_cmd = "%s --long --user=%s" % (self .poll_command , username )
109+ squeue_cmd = "%s --long --noheader -- user=%s" % (self .poll_command , username )
110110 squeue_output , squeue_err , squeue_exitcode = run_cmd (
111111 squeue_cmd ,
112112 "get_current_jobs(): squeue command" ,
@@ -125,9 +125,9 @@ def get_current_jobs(self):
125125 }
126126
127127 # get job info, logging any Slurm issues
128- # Note, the first two lines of the output are skipped ("range(2,...)")
129- # because they contain header information .
130- for i in range (2 , len (lines )):
128+ # Note, all output lines of squeue are processed because we run it with
129+ # --noheader .
130+ for i in range (0 , len (lines )):
131131 job = lines [i ].rstrip ().split ()
132132 if len (job ) >= 9 :
133133 job_id = job [0 ]
You can’t perform that action at this time.
0 commit comments