mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Stop 'timing out' old 'created' notifications
This is being replaced with a new alert and runbook [1]. It's not always appropriate to change the status to 'technical-failure', and the new alert means we'll act to fix the underlying issue promptly. We'll look at tidying up the remaining code in the next commits. [1]: https://github.com/alphagov/notifications-manuals/wiki/Support-Runbook#deal-with-email-or-sms-still-in-created
This commit is contained in:
@@ -28,7 +28,6 @@ from app.celery.service_callback_tasks import (
|
||||
create_delivery_status_callback_data,
|
||||
)
|
||||
from app.config import QueueNames
|
||||
from app.exceptions import NotificationTechnicalFailureException
|
||||
from app.models import EMAIL_TYPE, LETTER_TYPE, SMS_TYPE, FactProcessingTime
|
||||
from tests.app.db import (
|
||||
create_job,
|
||||
@@ -184,11 +183,9 @@ def test_update_status_of_notifications_after_timeout(notify_api, sample_templat
|
||||
status='pending',
|
||||
created_at=datetime.utcnow() - timedelta(
|
||||
seconds=current_app.config.get('SENDING_NOTIFICATIONS_TIMEOUT_PERIOD') + 10))
|
||||
with pytest.raises(NotificationTechnicalFailureException) as e:
|
||||
timeout_notifications()
|
||||
assert str(not2.id) in str(e.value)
|
||||
timeout_notifications()
|
||||
assert not1.status == 'temporary-failure'
|
||||
assert not2.status == 'technical-failure'
|
||||
assert not2.status == 'created'
|
||||
assert not3.status == 'temporary-failure'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user