From 395f449b93e16b40f1a3871aa64eff6c25bd4c0b Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 12 Mar 2023 12:09:53 +0800 Subject: [PATCH] Update webstats_common.lua --- plugins/webstats/lua/webstats_common.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/webstats/lua/webstats_common.lua b/plugins/webstats/lua/webstats_common.lua index 06a6382bb..5f1275fef 100644 --- a/plugins/webstats/lua/webstats_common.lua +++ b/plugins/webstats/lua/webstats_common.lua @@ -341,6 +341,7 @@ function _M.cron(self) for i=1,llen do local data, _ = ngx.shared.mw_total:lpop(total_key) if not data then + self:unlock_working(cron_key) break end @@ -352,11 +353,13 @@ function _M.cron(self) local db = dbs[input_sn] local stat_fields_is = stat_fields[input_sn] if not db then + self:unlock_working(cron_key) break end local insert_ok = self:store_logs_line(db, stmts[input_sn]["web_logs"], input_sn, info) if not insert_ok then + self:unlock_working(cron_key) break end