zulip/zerver
Alex Vandiver 5f5ad2f0b1 queue_processors: Defer initial email connection creation.
We previously created the connection to the outgoing email server when
the EmailSendingWorker was first created.  Since creating the
connection can fail (e.g. because of firewalls or typos in the
hostname), this can cause the `QueueProcessingWorker` creation to
raise an exception.  In multi-threaded mode, exceptions in the worker
threads which are _not_ during the handling of a specific event
percolate out to `log_and_exit_if_exception` and trigger the
termination of the entire process -- stopping all worker threads from
making forward progress.

Contain the blast radius of misconfigured email servers by deferring
the opening of the connection until it is first needed.  This will not
cause any overall performance change, since it only affects the
latency of the very first email after startup.

(cherry picked from commit c618c42729)
2024-01-15 12:02:53 -08:00
..
actions models: Move query_for_ids to zerver.lib.query_helpers. 2024-01-05 10:32:54 -05:00
data_import models: Extract zerver.models.streams. 2024-01-05 10:32:54 -05:00
integration_fixtures/nagios
lib s3: Add a setting for S3 addressing style. 2024-01-15 12:02:53 -08:00
management process_queue: For threaded workers, create them when they start. 2024-01-15 12:02:53 -08:00
migrations models: Extract zerver.models.realm_audit_logs. 2024-01-05 10:32:54 -05:00
models models: Extract zerver.models.lookups. 2024-01-05 10:32:54 -05:00
openapi user_topics: Validate 'topic' parameter length <= max_topic_length. 2024-01-05 10:32:54 -05:00
tests documentation: Support having no sidebar for policies docs. 2024-01-15 12:02:53 -08:00
tornado models: Extract zerver.models.clients. 2024-01-05 10:32:54 -05:00
transaction_tests models: Extract zerver.models.realms. 2024-01-05 10:32:54 -05:00
views documentation: Support having no sidebar for policies docs. 2024-01-15 12:02:53 -08:00
webhooks models: Extract zerver.models.clients. 2024-01-05 10:32:54 -05:00
worker queue_processors: Defer initial email connection creation. 2024-01-15 12:02:53 -08:00
__init__.py
apps.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
context_processors.py models: Extract zerver.models.realms. 2024-01-05 10:32:54 -05:00
decorator.py models: Extract zerver.models.clients. 2024-01-05 10:32:54 -05:00
filters.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
forms.py models: Extract zerver.models.realms. 2024-01-05 10:32:54 -05:00
logging_handlers.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
middleware.py models: Extract zerver.models.realms. 2024-01-05 10:32:54 -05:00
signals.py email: Add a space after the time and AM/PM in the login email. 2023-11-27 09:47:30 -08:00