Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
mdserver-web/plugins/webstats/lua/webstats_worker.lua

20 lines
460 B

local cpath = "{$SERVER_APP}/lua/"
if not package.cpath:find(cpath) then
package.cpath = cpath .. "?.so;" .. package.cpath
end
if not package.path:find(cpath) then
package.path = cpath .. "?.lua;" .. package.path
end
local __WS_C = require "webstats_common"
local WS_C = __WS_C:getInstance()
WS_C:cronPre()
local webstats_cron_pre = function(premature)
WS_C:cronPre()
end
if ngx.worker.id() == 0 then
ngx.timer.every(60, webstats_cron_pre)
end