TornadoQueueClient: Don't stop the Tornado I/O loop on RabbitMQ disconnect

Requires Pika 0.9.6 or later.

(imported from commit 316ab9f2a6b5c2a25ae8584e2604222b33e0dec3)
This commit is contained in:
Keegan McAllister
2013-01-28 18:00:24 -05:00
committed by Leo Franchi
parent 6ffc2bbe65
commit 4baeaaa532

View File

@@ -77,10 +77,8 @@ class TornadoQueueClient(SimpleQueueClient):
def _connect(self):
self.connection = pika.adapters.TornadoConnection(
self._get_parameters(),
on_open_callback = self._on_open)
# Docs suggest we should also pass stop_ioloop_on_close = False, but
# my version of TornadoConnection doesn't recognize it.
on_open_callback = self._on_open,
stop_ioloop_on_close = False)
def _on_open(self, connection):
self.connection.channel(