zulip/zerver
Anders Kaseorg c263bfdb41 queue: Use a thread-local Pika connection.
According to the documentation: “Pika does not have any notion of
threading in the code. If you want to use Pika with threading, make
sure you have a Pika connection per thread, created in that thread. It
is not safe to share one Pika connection across threads, with one
exception: you may call the connection method add_callback_threadsafe
from another thread to schedule a callback within an active pika
connection.”

https://pika.readthedocs.io/en/stable/faq.html

This also means that synchronous Django code running in Tornado will
use its own synchronous SimpleQueueClient rather than sharing the
asynchronous TornadoQueueClient, which is unfortunate but necessary as
they’re about to be on different threads.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-02 17:41:49 -07:00
..
actions users: Use browser locale to set the default language of new user. 2022-04-28 15:03:26 -07:00
data_import python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
integration_fixtures/nagios tests: Add a test for fixtures for non-webhook integrations. 2021-04-28 08:16:51 -07:00
lib queue: Use a thread-local Pika connection. 2022-05-02 17:41:49 -07:00
management queue: Use a thread-local Pika connection. 2022-05-02 17:41:49 -07:00
migrations python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
openapi openapi: Fix reference link in /register-queue documentation. 2022-04-29 08:35:25 -07:00
tests users: Use browser locale to set the default language of new user. 2022-04-28 15:03:26 -07:00
tornado queue: Use a thread-local Pika connection. 2022-05-02 17:41:49 -07:00
views users: Use browser locale to set the default language of new user. 2022-04-28 15:03:26 -07:00
webhooks slack_incoming: Process request payload directly in view.py. 2022-04-28 14:45:38 -07:00
worker workers: Log the exception if the export fails. 2022-04-28 11:52:47 -07:00
__init__.py django: Upgrade Zulip to Django 3.2 LTS. 2021-05-03 08:36:22 -07:00
apps.py caching: Make sender type optional for flush_cache. 2021-07-26 14:48:07 -07:00
context_processors.py home: Simplify and comment terms of service notice implementation. 2022-02-04 15:48:38 -08:00
decorator.py decorator: Strengthen decorator types using ParamSpec. 2022-04-14 12:44:35 -07:00
filters.py typing: Fix function signatures. 2021-08-20 05:54:19 -07:00
forms.py forms: Fix type of domain_override parameter. 2022-04-27 12:40:14 -07:00
logging_handlers.py python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
middleware.py middleware: Add client REQ parameter to parse_client. 2022-04-08 11:29:33 -07:00
models.py python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
signals.py actions: Split out zerver.actions.video_calls. 2022-04-14 17:14:30 -07:00