[rabbitmq-discuss] Blocking queue.get() in python?
yoavglazner at gmail.com
Mon Jan 31 19:59:35 GMT 2011
I'm trying to implement a priority queue over Rabbit with python, and this
is my idea
each batch of tasks has its own queue, each worker knows about all the
batches and their priorities.
now the part where I don't understand:
how does a worker tries a take a task from a batch(queue) but if its
empty it passes to the next batch?
I need somthing like:
for q in queuesSortedByPriority:
t = q.get()
if t: break
else: raise NoTaskFound()
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss