mirror of https://github.com/zulip/zulip.git
c77c78f147
An exception which escapes from this loop can kill the background worker thread; this results in consuming the queue (leading to the illusion of progress) but more and more rows silently piling up in the ScheduledMessageNotificationEmail table. Wrap the inside of the `while True` loop in a try/catch to make sure that no exceptions escape and kill the background thread. To prevent even more indentation, the inner loop is extracted into its own function. It returns true/false to signal if the `self.stopping` was set to tell the loop to stop; we cannot check it ourselves in the outer loop because it needs to hold the lock to be examined. |
||
---|---|---|
.. | ||
actions | ||
data_import | ||
integration_fixtures/nagios | ||
lib | ||
management | ||
migrations | ||
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 | ||
models.py | ||
signals.py |