projects
/
ganeti-local
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a14a17f
)
Implement selective job query
author
Iustin Pop
<iustin@google.com>
Mon, 7 Apr 2008 11:18:04 +0000
(11:18 +0000)
committer
Iustin Pop
<iustin@google.com>
Mon, 7 Apr 2008 11:18:04 +0000
(11:18 +0000)
This patch implements query-ing of only selected jobs instead of all.
Reviewed-by: ultrotter
lib/jqueue.py
patch
|
blob
|
history
diff --git
a/lib/jqueue.py
b/lib/jqueue.py
index
e9b0c29
..
b0b8916
100644
(file)
--- a/
lib/jqueue.py
+++ b/
lib/jqueue.py
@@
-101,8
+101,12
@@
class QueueManager:
"""
result = []
self.lock.acquire()
+ if names:
+ values = [self.job_queue[j_id] for j_id in names]
+ else:
+ values = self.job_queue.itervalues()
try:
- for jobj in self.job_queue.itervalues():
+ for jobj in values:
row = []
jdata = jobj.data
for fname in fields: