mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
allow pending notifications to influence switchover.
Currently we switch if: * status = delivered and updated_at - sent_at > threshold * status = sending and now - sent_at > threshold firetext can leave notifications in the pending state, which is equivalent to sending in terms of how we should handle it, so this commit changes the second case to allow pending as well as sending.
This commit is contained in:
@@ -484,7 +484,7 @@ def is_delivery_slow_for_provider(
|
||||
).filter(
|
||||
Notification.created_at >= created_at,
|
||||
Notification.sent_at.isnot(None),
|
||||
Notification.status.in_([NOTIFICATION_DELIVERED, NOTIFICATION_SENDING]),
|
||||
Notification.status.in_([NOTIFICATION_DELIVERED, NOTIFICATION_PENDING, NOTIFICATION_SENDING]),
|
||||
Notification.sent_by == provider,
|
||||
Notification.key_type != KEY_TYPE_TEST
|
||||
).group_by("slow").all()
|
||||
|
||||
Reference in New Issue
Block a user