Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-ganeti
Commits
f0d874fe
Commit
f0d874fe
authored
Jul 15, 2008
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/jqueue.py
View file @
f0d874fe
...
...
@@ -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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment