if rem_wait > 0:
time.sleep(rem_wait)
jobids = [job.jobid for job in jobs]
// We don"t run the command with check=True, because if the job has
// finished already, squeue might return an error about an invalid
// job id.
completed = os_ext.run_command("squeue -h -j %s "
"-o "%%i|%%T|%%N|%%r"" %
",".join([str(j) for j in jobids]))
// We need the match objects, so we have to use finditer()
state_match = list(re.finditer(r"^(?P<jobid>%s)\|(?P<state>\S+)\|"
r"(?P<nodespec>\S*)\|"
After Change
return
m = max(job.submit_time for job in jobs)
time_from_last_submit = time.time() - m
rem_wait = self.SQUEUE_DELAY - time_from_last_submit
if rem_wait > 0:
time.sleep(rem_wait)