send_email: Increase loglevel of stuck ScheduledEmail messages to error.

Since these stay in the queue indefinitely, they deserve to be raised
at a higher error than just warning.
This commit is contained in:
Alex Vandiver 2021-05-27 17:33:40 -07:00 committed by Tim Abbott
parent e080a05b05
commit b9948994d7
2 changed files with 2 additions and 2 deletions

View File

@ -434,7 +434,7 @@ def deliver_scheduled_emails(email: ScheduledEmail) -> None:
# This state doesn't make sense, so something must be mutating,
# or in the process of deleting, the object. We assume it will bring
# things to a correct state, and we just do nothing except logging this event.
logger.warning("ScheduledEmail id %s has empty users and address attributes.", email.id)
logger.error("ScheduledEmail id %s has empty users and address attributes.", email.id)
return
if user_ids:

View File

@ -1468,7 +1468,7 @@ class ActivateTest(ZulipTestCase):
self.assertEqual(
info_log.output,
[
f"WARNING:zulip.send_email:ScheduledEmail id {email.id} has empty users and address attributes."
f"ERROR:zulip.send_email:ScheduledEmail id {email.id} has empty users and address attributes."
],
)