This commit is contained in:
parent
088337765c
commit
b3a0f11a80
|
|
@ -45,6 +45,7 @@ end
|
|||
function _M.getInstance(self)
|
||||
if rawget(self, "instance") == nil then
|
||||
rawset(self, "instance", self.new())
|
||||
self.cron()
|
||||
end
|
||||
assert(self.instance ~= nil)
|
||||
return self.instance
|
||||
|
|
@ -474,8 +475,7 @@ function _M.cron(self)
|
|||
ngx.update_time()
|
||||
-- self:D("PID:"..tostring(ngx.worker.id()).."--【"..tostring(llen).."】, elapsed: " .. tostring(ngx.now() - begin))
|
||||
end
|
||||
|
||||
ngx.timer.every(1, timer_every_get_data)
|
||||
ngx.timer.every(0.5, timer_every_get_data)
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,5 +17,4 @@ end
|
|||
|
||||
if ngx.worker.id() == 0 then
|
||||
ngx.timer.every(60, webstats_cron_pre)
|
||||
WS_C:cron()
|
||||
end
|
||||
Loading…
Reference in New Issue