mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 07:46:06 -04: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:
@@ -97,7 +97,7 @@ def delete_invitations():
|
||||
@statsd(namespace="tasks")
|
||||
def switch_current_sms_provider_on_slow_delivery():
|
||||
"""
|
||||
Switch providers if there are at least two slow delivery notifications (more than four minutes)
|
||||
Switch providers if at least 10% of notifications took more than four minutes to be delivered
|
||||
in the last ten minutes. Search from the time we last switched to the current provider.
|
||||
"""
|
||||
current_provider = get_current_provider('sms')
|
||||
|
||||
Reference in New Issue
Block a user