Commit f0d874fe authored by Iustin Pop's avatar Iustin Pop
Browse files

Sort the job list in _GetJobIDsUnlocked

Since the IDs are integers, we can simply sort them.

Reviewed-by: imsnah
parent 36088c4c
......@@ -367,8 +367,10 @@ class JobStorage(object):
"""
jfiles = self._ListJobFiles()
return [int(m.group(1)) for m in
jlist = [int(m.group(1)) for m in
[self._RE_JOB_FILE.match(name) for name in jfiles]]
jlist.sort()
return jlist
def _ListJobFiles(self):
assert self.lock_fd, "Queue should be open"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment