|
|
@ -266,15 +266,15 @@ end |
|
|
|
function _M.cron(self) |
|
|
|
function _M.cron(self) |
|
|
|
|
|
|
|
|
|
|
|
local timer_every_get_data = function (premature) |
|
|
|
local timer_every_get_data = function (premature) |
|
|
|
self:cronPre() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local llen, _ = ngx.shared.mw_total:llen(total_key) |
|
|
|
local llen, _ = ngx.shared.mw_total:llen(total_key) |
|
|
|
-- self:D("PID:"..tostring(ngx.worker.id())..",llen:"..tostring(llen)) |
|
|
|
-- self:D("PID:"..tostring(ngx.worker.id())..",llen:"..tostring(llen)) |
|
|
|
if llen == 0 then |
|
|
|
if llen == 0 then |
|
|
|
return true |
|
|
|
return true |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self:cronPre() |
|
|
|
|
|
|
|
|
|
|
|
ngx.update_time() |
|
|
|
ngx.update_time() |
|
|
|
local begin = ngx.now() |
|
|
|
local begin = ngx.now() |
|
|
|
|
|
|
|
|
|
|
|