Add alert notification retention policy by default 1h. (#6240)

This commit is contained in:
Nicolo Maio 2023-07-19 16:25:32 +00:00
parent c001934873
commit 9c3acf2f06
12 changed files with 86 additions and 0 deletions

View file

@ -137,7 +137,12 @@ function telegram.dequeueRecipientAlerts(recipient, budget)
for i=1, max_alerts_per_request do
local notification = ntop.recipient_dequeue(recipient.recipient_id)
if notification then
if alert_utils.filter_notification(notification) then
notifications[#notifications + 1] = notification.alert
else
break
end
else
break
end