mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 14:29:25 -04:00
Remove alert for email / sms in created
In response to [1]. [1]: https://github.com/alphagov/notifications-api/pull/3383#discussion_r759379988 It turns out the code that inspired this new alert - in the old "timeout-sending-notifications" task - was actually redundant as we already have a task to "replay" notifications still in "created", which is much better than just alerting about them. It's possible the replayed notifications will also fail, but in both cases we should see some kind of error due to this, so I don't think we're losing anything by not having an alert.
This commit is contained in:
@@ -487,16 +487,6 @@ def dao_delete_notifications_by_id(notification_id):
|
||||
).delete(synchronize_session='fetch')
|
||||
|
||||
|
||||
def dao_check_notifications_still_in_created(minimum_age_in_seconds):
|
||||
min_created_at = datetime.utcnow() - timedelta(seconds=minimum_age_in_seconds)
|
||||
|
||||
return Notification.query.filter(
|
||||
Notification.created_at < min_created_at,
|
||||
Notification.status == NOTIFICATION_CREATED,
|
||||
Notification.notification_type.in_([SMS_TYPE, EMAIL_TYPE])
|
||||
).count()
|
||||
|
||||
|
||||
def dao_timeout_notifications(timeout_period_in_seconds):
|
||||
"""
|
||||
Timeout SMS and email notifications by the following rules:
|
||||
|
||||
Reference in New Issue
Block a user