mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Implements deadlines for periodic and user scripts
This commit is contained in:
parent
7f449f8e64
commit
0e64fd94d6
30 changed files with 117 additions and 112 deletions
|
|
@ -57,7 +57,7 @@ end
|
|||
-- This is necessary both to avoid paying the database io cost inside
|
||||
-- the other scripts and as a necessity to avoid a deadlock on the
|
||||
-- host hash in the host.lua script
|
||||
function alerts_api.checkPendingStoreAlerts(deadline)
|
||||
function alerts_api.checkPendingStoreAlerts()
|
||||
if(not areAlertsEnabled()) then
|
||||
return(false)
|
||||
end
|
||||
|
|
@ -86,7 +86,7 @@ function alerts_api.checkPendingStoreAlerts(deadline)
|
|||
end
|
||||
end
|
||||
|
||||
if(os.time() > deadline) then
|
||||
if ntop.isDeadlineApproaching() then
|
||||
return(false)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue