Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -367,8 +367,10 @@ class JobStorage(object):
"""
jfiles = self._ListJobFiles()
return [int(m.group(1)) for m in
[self._RE_JOB_FILE.match(name) for name in jfiles]]
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"
......
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