mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Only send to the provider if the notification has a created status.
If the notification ends up in the retry queue and the delivery app is restarted the notification will get sent twice. This is because when the app is restarted another message will be in the retry queue as message available which is a duplicate of the one in the queue that is a message in flight. This should complete https://www.pivotaltracker.com/story/show/121844427
This commit is contained in:
@@ -678,7 +678,7 @@ def test_get_all_notifications_for_job_by_status(notify_db, notify_db_session, s
|
||||
|
||||
|
||||
def test_update_notification(sample_notification, sample_template):
|
||||
assert sample_notification.status == 'sending'
|
||||
assert sample_notification.status == 'created'
|
||||
sample_notification.status = 'failed'
|
||||
dao_update_notification(sample_notification)
|
||||
notification_from_db = Notification.query.get(sample_notification.id)
|
||||
|
||||
Reference in New Issue
Block a user