|
|
@ -266,8 +266,6 @@ 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)) |
|
|
@ -275,6 +273,8 @@ function _M.cron(self) |
|
|
|
return true |
|
|
|
return true |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self:cronPre() |
|
|
|
|
|
|
|
|
|
|
|
ngx.update_time() |
|
|
|
ngx.update_time() |
|
|
|
local begin = ngx.now() |
|
|
|
local begin = ngx.now() |
|
|
|
|
|
|
|
|
|
|
|