From ee93d2fc21f5ef7c37f856a74b55ece41918d864 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 5 Nov 2022 23:34:52 +0800 Subject: [PATCH 1/4] Update webstats_common.lua --- plugins/webstats/lua/webstats_common.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/webstats/lua/webstats_common.lua b/plugins/webstats/lua/webstats_common.lua index a596dbf9f..fbc6d246e 100644 --- a/plugins/webstats/lua/webstats_common.lua +++ b/plugins/webstats/lua/webstats_common.lua @@ -47,9 +47,9 @@ function _M.getInstance(self) if rawget(self, "instance") == nil then rawset(self, "instance", self.new()) - if 0 == ngx.worker.id() then - self:cron() - end + -- if 0 == ngx.worker.id() then + self:cron() + -- end end assert(self.instance ~= nil) return self.instance From 8bdd24daa1e50a0dff505d9e01b3f36d54b17fe6 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 5 Nov 2022 23:37:16 +0800 Subject: [PATCH 2/4] Update webstats_common.lua --- plugins/webstats/lua/webstats_common.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/webstats/lua/webstats_common.lua b/plugins/webstats/lua/webstats_common.lua index fbc6d246e..e94ddc2ea 100644 --- a/plugins/webstats/lua/webstats_common.lua +++ b/plugins/webstats/lua/webstats_common.lua @@ -448,7 +448,7 @@ function _M.cron(self) -- self:D("--【"..tostring(llen).."】, elapsed: " .. tostring(ngx.now() - begin)) end - ngx.timer.every(0.5, timer_every_get_data) + ngx.timer.every(1, timer_every_get_data) end From fd6160e30f7a5aea5b0a7c1506f11e82b2cdb838 Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 5 Nov 2022 23:38:34 +0800 Subject: [PATCH 3/4] Update requirements.txt --- requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4484ef5bb..e0703f4cc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ setuptools>=33.1.1 Werkzeug>=1.0.1 wheel==0.33.6 gunicorn==20.1.0 -requests==2.20.0 +requests==2.24.0 flask==2.0.3 flask-session==0.3.2 flask-helper==0.19 @@ -13,7 +13,6 @@ psutil==5.9.1 chardet==3.0.4 flask-sqlalchemy==2.3.2 cryptography==3.3.2 -requests==2.20.0 configparser==5.2.0 python-engineio==4.3.2 python-socketio>=4.2.0 From bcbaf1d26dd2918e8f20af204ea381f393fa7f9f Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 5 Nov 2022 23:39:30 +0800 Subject: [PATCH 4/4] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index e0703f4cc..3e4c8319d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ Werkzeug>=1.0.1 wheel==0.33.6 gunicorn==20.1.0 requests==2.24.0 +urllib3=1.25.2 flask==2.0.3 flask-session==0.3.2 flask-helper==0.19