mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
Only register a Tornado rabbitmq handler if we're using rabbitmq.
(imported from commit 726934bc9acab3b19720f6b5ab1d0736ddd96832)
This commit is contained in:
@@ -230,7 +230,8 @@ elif settings.USING_RABBITMQ:
|
|||||||
|
|
||||||
def setup_tornado_rabbitmq():
|
def setup_tornado_rabbitmq():
|
||||||
# When tornado is shut down, disconnect cleanly from rabbitmq
|
# When tornado is shut down, disconnect cleanly from rabbitmq
|
||||||
atexit.register(lambda: queue_client.close())
|
if settings.USING_RABBITMQ:
|
||||||
|
atexit.register(lambda: queue_client.close())
|
||||||
|
|
||||||
# We using a simple lock to prevent multiple RabbitMQ messages being
|
# We using a simple lock to prevent multiple RabbitMQ messages being
|
||||||
# sent to the SimpleQueueClient at the same time; this is a workaround
|
# sent to the SimpleQueueClient at the same time; this is a workaround
|
||||||
|
|||||||
Reference in New Issue
Block a user