This commit is contained in:
midoks 2023-02-12 00:44:35 +08:00
parent 088337765c
commit b3a0f11a80
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -17,5 +17,4 @@ end
if ngx.worker.id() == 0 then
ngx.timer.every(60, webstats_cron_pre)
WS_C:cron()
end