<div dir="ltr"><div class="gmail_quote">On Mon, Jan 31, 2011 at 9:59 PM, yoav glazner <span dir="ltr">&lt;<a href="mailto:yoavglazner@gmail.com">yoavglazner@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr">Hi,<div><br></div><div>I&#39;m trying to implement a priority queue over Rabbit with python, and this is my idea</div><div>each batch of tasks has its own queue, each worker knows about all the batches and their priorities.</div>

<div>now the part where I don&#39;t understand:</div><div>��how does a worker tries a take a task from a batch(queue) �but if its empty it passes to the next batch?</div><div><br></div><div>I need somthing like:</div><div>

<br></div><div>for q in queuesSortedByPriority:</div><div>��t = q.get()</div><div>��if t: break</div><div>else: raise NoTaskFound()</div></div></blockquote><div>�</div><div>I saw in the java example-</div><div><a href="http://www.rabbitmq.com/tutorial-one-java.html">http://www.rabbitmq.com/tutorial-one-java.html</a></div>
<div>the following line:</div><div><span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 9.02778px; color: rgb(85, 85, 85); line-height: 18px; "><span class="code " style="color: rgb(0, 139, 139); background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(246, 252, 176); padding-top: 0px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; background-position: initial initial; background-repeat: initial initial; ">QueueingConsumer.nextDelivery()</span>�blocks until another message has been delivered from the server.</span></div>
<div>I haven&#39;t seen anything like this for python. is there anything similar?</div></div><br></div>