From 79dd66d2b896c2454b5ac6d3460bd4be590b3c6c Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Mon, 16 Sep 2024 21:41:03 +0545 Subject: [PATCH] fix: notification summary don't count failed notifications that have reached max attempts as Pending --- views/015_job_history.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/015_job_history.sql b/views/015_job_history.sql index cd45b568..2d69d1eb 100644 --- a/views/015_job_history.sql +++ b/views/015_job_history.sql @@ -237,7 +237,8 @@ FROM LEFT JOIN notification_send_summary ON notifications.id = notification_send_summary.notification_id LEFT JOIN event_queue ON notifications.id::TEXT = event_queue.properties->>'notification_id' AND - event_queue.name = 'notification.send' + event_queue.name = 'notification.send' AND + event_queue.attempts < 4 WHERE notifications.deleted_at IS NULL GROUP BY notifications.id,