mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 06:39:25 +08:00
Update webstats_common.lua
This commit is contained in:
@@ -240,6 +240,8 @@ function _M.get_http_origin(self)
|
||||
end
|
||||
|
||||
function _M.cronPre(self)
|
||||
self:lock_working('cron_init_stat')
|
||||
|
||||
local time_key = self:get_store_key()
|
||||
local time_key_next = self:get_store_key_with_time(ngx.time()+3600)
|
||||
|
||||
@@ -272,6 +274,8 @@ function _M.cronPre(self)
|
||||
end
|
||||
end
|
||||
|
||||
self:unlock_working('cron_init_stat')
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -317,6 +321,11 @@ function _M.cron(self)
|
||||
return true
|
||||
end
|
||||
|
||||
-- 初始化统计表时不执行
|
||||
if self:is_working('cron_init_stat') then
|
||||
return true
|
||||
end
|
||||
|
||||
local db = self:initDB(input_sn)
|
||||
|
||||
stat_fields[input_sn] = {}
|
||||
|
||||
Reference in New Issue
Block a user