Merge pull request #2777 from alphagov/add-runbook-link

Add runbook link to resolve letters pending virus scan
This commit is contained in:
David McDonald
2020-03-30 13:50:30 +01:00
committed by GitHub
2 changed files with 6 additions and 4 deletions

View File

@@ -216,8 +216,9 @@ def check_precompiled_letter_state():
if len(letters) > 0:
letter_ids = [str(letter.id) for letter in letters]
msg = "{} precompiled letters have been pending-virus-check for over 90 minutes. " \
"Notifications: {}".format(len(letters), letter_ids)
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)
current_app.logger.exception(msg)

View File

@@ -373,8 +373,9 @@ def test_check_precompiled_letter_state(mocker, sample_letter_template):
check_precompiled_letter_state()
message = "2 precompiled letters have been pending-virus-check for over 90 minutes. " \
"Notifications: ['{}', '{}']".format(noti_2.id, noti_1.id)
message = """2 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(noti_2.id, noti_1.id)
mock_logger.assert_called_once_with(message)
mock_create_ticket.assert_called_with(