zulip/zerver/tornado
Umair Khan b4d49720b0 tornado: Close queue connection on reload.
Tornado reloads the app whenever there is a change in code. Due to this,
new connection is created to the client which also results in a new
channel. To avoid creating two channels for the queue in the RabbitMQ
broker we should close the old channel. Otherwise messages sent to the
queue will be distributed among these two channels in a round robin
scheme and we will end up losing one message since one of the channels
doesn't have an active consumer.

This commit closes the connection to the queue whenever Tornado reloads
the application using add_reload_hook().

Fixes #5824.
2017-07-21 11:19:26 -07:00
..
__init__.py tornado: Move tornado_ioloop_logging to new zerver/tornado tree. 2016-11-26 21:24:05 -08:00
application.py tornado: Close queue connection on reload. 2017-07-21 11:19:26 -07:00
descriptors.py pep8: Add compliance with rule E261 to descriptors.py. 2017-05-07 23:21:50 -07:00
event_queue.py Revert commits related to client_message_id. 2017-07-14 12:13:35 -07:00
handlers.py Django 1.11: MIDDLEWARE_CLASSES setting is deprecated. 2017-06-13 15:04:04 -07:00
ioloop_logging.py pep8: Add compliance with rule E261 to ioloop_logging.py. 2017-05-07 23:21:50 -07:00
socket.py Revert commits related to client_message_id. 2017-07-14 12:13:35 -07:00
views.py decorator: Add support for Django internal_notify_view. 2017-04-18 09:59:07 -07:00
websocket_client.py Revert commits related to client_message_id. 2017-07-14 12:13:35 -07:00