diff --git a/plugins/webstats/lua/webstats_common.lua b/plugins/webstats/lua/webstats_common.lua index 34f9965b7..bc135ac11 100644 --- a/plugins/webstats/lua/webstats_common.lua +++ b/plugins/webstats/lua/webstats_common.lua @@ -266,15 +266,15 @@ end function _M.cron(self) local timer_every_get_data = function (premature) - self:cronPre() - - + local llen, _ = ngx.shared.mw_total:llen(total_key) -- self:D("PID:"..tostring(ngx.worker.id())..",llen:"..tostring(llen)) if llen == 0 then return true end + self:cronPre() + ngx.update_time() local begin = ngx.now()