Downgrade exceptions to warnings to reduce emails

We already trigger a zendesk ticket for these two cases, meaning that
whenever we get this situation, we get 3 emails. One for the zendesk
ticket, one from logit raising the fact an exception was raised and one
from cloudwatch raising the fact an exception was raised.

We don't need all these emails, a zendesk ticket is sufficient.
Downgrading to a warning means this event will still be findable in our
logs however.
This commit is contained in:
David McDonald
2021-02-02 11:53:09 +00:00
parent a3d966056a
commit 070b79c27e
2 changed files with 5 additions and 5 deletions

View File

@@ -204,7 +204,7 @@ def check_precompiled_letter_state():
https://github.com/alphagov/notifications-manuals/wiki/Support-Runbook#Deal-with-letter-pending-virus-scan-for-90-minutes.
Notifications: {}""".format(len(letters), sorted(letter_ids))
current_app.logger.exception(msg)
current_app.logger.warning(msg)
if current_app.config['NOTIFY_ENVIRONMENT'] in ['live', 'production', 'test']:
zendesk_client.create_ticket(
@@ -225,7 +225,7 @@ def check_templated_letter_state():
msg = "{} letters were created before 17.30 yesterday and still have 'created' status. " \
"Notifications: {}".format(len(letters), letter_ids)
current_app.logger.exception(msg)
current_app.logger.warning(msg)
if current_app.config['NOTIFY_ENVIRONMENT'] in ['live', 'production', 'test']:
zendesk_client.create_ticket(