Adding reference to message for "precompiled letters have been pending-virus-check for over 90 minutes"

This saves having to go to the db to get it.
This commit is contained in:
Rebecca Law
2020-09-24 14:16:16 +01:00
parent 120b760cae
commit d7e53cdf50
2 changed files with 14 additions and 9 deletions

View File

@@ -195,11 +195,11 @@ def check_precompiled_letter_state():
letters = dao_precompiled_letters_still_pending_virus_check()
if len(letters) > 0:
letter_ids = [str(letter.id) for letter in letters]
letter_ids = [(str(letter.id), letter.reference) for letter in letters]
msg = """{} precompiled letters have been pending-virus-check for over 90 minutes. Follow runbook to resolve:
https://github.com/alphagov/notifications-manuals/wiki/Support-Runbook#Deal-with-letter-pending-virus-scan-for-90-minutes.
Notifications: {}""".format(len(letters), letter_ids)
Notifications: {}""".format(len(letters), sorted(letter_ids))
current_app.logger.exception(msg)