mirror of https://github.com/zulip/zulip.git
c618c42729
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. |
||
---|---|---|
.. | ||
actions | ||
data_import | ||
integration_fixtures/nagios | ||
lib | ||
management | ||
migrations | ||
models | ||
openapi | ||
tests | ||
tornado | ||
transaction_tests | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
signals.py |