fix: mark schedule notification as processed when agent fetch fails for email notification

This commit is contained in:
Abhinav Raut
2025-03-22 18:55:01 +05:30
parent 860b216e2b
commit b6ce6975c9

View File

@@ -348,6 +348,9 @@ func (m *Manager) SendNotification(scheduledNotification models.ScheduledSLANoti
agent, err := m.userStore.GetAgent(recipientID)
if err != nil {
m.lo.Error("error fetching agent for SLA notification", "recipient_id", recipientID, "error", err)
if _, err := m.q.MarkNotificationProcessed.Exec(scheduledNotification.ID); err != nil {
m.lo.Error("error marking notification as processed", "error", err)
}
continue
}