|
@@ -362,6 +362,9 @@ class QueueReader(MessageQueue,Reader):
|
|
|
self.data[qid] = []
|
|
|
|
|
|
self.data[qid].append(r)
|
|
|
+ #
|
|
|
+ # We stop reading when the all the messages of the queue are staked
|
|
|
+ #
|
|
|
if self.size == len(self.data[qid]) or len(self.data[qid]) == self.info.method.message_count:
|
|
|
self.close()
|
|
|
|
|
@@ -374,6 +377,10 @@ class QueueReader(MessageQueue,Reader):
|
|
|
def read(self,size=-1):
|
|
|
r = {}
|
|
|
self.size = size
|
|
|
+ #
|
|
|
+ # We enabled the reader to be able to read from several queues (sequentially for now)
|
|
|
+ # The qid parameter will be an array of queues the reader will be reading from
|
|
|
+ #
|
|
|
for qid in self.qid:
|
|
|
self.init(qid)
|
|
|
# r[qid] = []
|
|
@@ -387,7 +394,7 @@ class QueueReader(MessageQueue,Reader):
|
|
|
#self.close()
|
|
|
|
|
|
# r[qid].append( self.data)
|
|
|
- print self.data
|
|
|
+
|
|
|
return self.data
|
|
|
|
|
|
"""
|