Fix alert notification periodicity

This commit is contained in:
emanuele-f 2018-04-10 16:39:24 +02:00
parent 6c98de951e
commit e0a2aa8088
2 changed files with 3 additions and 3 deletions

View file

@ -2649,7 +2649,7 @@ function formatAlertNotification(notif, nohtml, noseverity)
end
function processAlertNotifications(now, periodic_frequency)
local deadline = now + (now + periodic_frequency) % periodic_frequency
local deadline = now - (now % periodic_frequency) + periodic_frequency
local modules = getEnabledAlertNotificationModules()
-- Get new alerts
@ -2688,7 +2688,7 @@ function processAlertNotifications(now, periodic_frequency)
local to_export = {}
-- Translate into notification object
for _, json_message in ipairs(pending_notifications) do
for _, json_message in pairsByKeys(pending_notifications, rev) do
local notification = json.decode(json_message)
local severity_num = notification.severity