tornado: Support sharding by user ID.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-09-22 13:09:34 -07:00
committed by Tim Abbott
parent 8010d06f9e
commit e5c26eeb86
11 changed files with 146 additions and 35 deletions

View File

@@ -19,6 +19,7 @@ if settings.PRODUCTION:
from zerver.lib.async_utils import NoAutoCreateEventLoopPolicy
from zerver.lib.debug import interactive_debug_listen
from zerver.tornado.application import create_tornado_application, setup_tornado_rabbitmq
from zerver.tornado.descriptors import set_current_port
from zerver.tornado.event_queue import (
add_client_gc_hook,
dump_event_queues,
@@ -91,6 +92,7 @@ class Command(BaseCommand):
)
await sync_to_async(add_signal_handlers, thread_sensitive=True)()
set_current_port(port)
translation.activate(settings.LANGUAGE_CODE)
# We pass display_num_errors=False, since Django will