[rabbitmq-discuss] Python example on event-driving consumer?
njsss
shilei1980 at gmail.com
Mon Jan 9 23:49:07 GMT 2012
Excuse me for being a newb, but how to "loop for N ms" in Pika
(haven't got time to look into haigha)?
I tried to set a timeout func in the ioloop:
def on_timeout():
global connection
print "timeout"
connection.close()
connection.add_timeout(timeout, on_timeout)
and insert these between each frame (don't really know how to do the
queue in that game engine (panda3D) as well :( ):
connection = SelectConnection(parameters, on_connected)
connection.add_timeout(timeout, on_timeout)
connection.ioloop.start()
but running into trouble
"UserWarning: SelectConnection.Close invoked while closing or closed
self.__class__.__name__) "
On Jan 9, 12:16 pm, Aaron Westendorf <aa... at agoragames.com> wrote:
> You can also use haigha which supports pyevent and gevent for its loop.https://github.com/agoragames/haigha
>
> Regarding your animation loop, you can simply queue the "draw()" onto
> the event loop so it's all in synch, use native threading, or both
> pyevent and gevent support a concept of "loop for N milliseconds, then
> return", so you can call that whenever your animation loop yields.
>
> -Aaron
>
> On Fri, Jan 6, 2012 at 1:02 PM, njsss <shilei1... at gmail.com> wrote:
> > Hello all,
>
> > I'm new to rabbitmq and python as well. I installed pika and followed
> > the tutorials. But what I need is an event-driving messenger. Is there
> > anyway to do it?
>
> > Thanks,
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-disc... at lists.rabbitmq.com
> >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> --
> Aaron Westendorf
> Senior Software Engineer
> Agora Games
> 359 Broadway
> Troy, NY 12180
> Phone: 518.268.1000
> aa... at agoragames.comwww.agoragames.com
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list