zulip/zerver
Alex Vandiver c77c78f147 missed-message: Add a try-catch to prevent killing background thread.
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.
2023-07-25 10:01:00 -07:00
..
actions realm_playgrounds: Refactor error handling for validation on creation. 2023-07-24 17:40:59 -07:00
data_import ruff: Fix UP032 Use f-string instead of `format` call. 2023-07-19 16:14:59 -07:00
integration_fixtures/nagios
lib realm_playgrounds: Replace url_prefix with url_template. 2023-07-24 17:40:59 -07:00
management sync_ldap_user_data: Pass realm as arg to select_related. 2023-07-20 10:44:39 -07:00
migrations realm_playgrounds: Replace url_prefix with url_template. 2023-07-24 17:40:59 -07:00
openapi realm_playgrounds: Refactor error handling for validation on creation. 2023-07-24 17:40:59 -07:00
tests realm_playgrounds: Refactor error handling for validation on creation. 2023-07-24 17:40:59 -07:00
tornado mention: Send notifications for @topic wildcard mentions. 2023-07-17 09:39:24 -07:00
transaction_tests test_classes: Do not necessary wrap test cases in a transaction. 2023-07-06 11:44:50 -07:00
views realm_playgrounds: Refactor error handling for validation on creation. 2023-07-24 17:40:59 -07:00
webhooks ruff: Fix SIM118 Use `k not in d` instead of `k not in d.keys()`. 2023-07-24 10:39:28 -07:00
worker missed-message: Add a try-catch to prevent killing background thread. 2023-07-25 10:01:00 -07:00
__init__.py
apps.py requirements: Upgrade Python requirements. 2023-04-03 22:39:21 -07:00
context_processors.py emails: Add corporate_enabled to context for emails. 2023-05-01 10:32:43 -07:00
decorator.py logging_util: Remove dependence on get_current_request. 2023-07-11 22:23:47 -07:00
filters.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
forms.py python: Convert translated positional {} fields to {named} fields. 2023-07-18 15:19:07 -07:00
logging_handlers.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
middleware.py logging_util: Remove dependence on get_current_request. 2023-07-11 22:23:47 -07:00
models.py realm_playgrounds: Replace url_prefix with url_template. 2023-07-24 17:40:59 -07:00
signals.py requirements: Upgrade to Django 4.0. 2022-07-13 16:07:17 -07:00