Merge pull request #251 from midoks/dev

网站统计优化
This commit is contained in:
Mr Chen
2022-11-05 23:42:56 +08:00
committed by GitHub
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -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
@@ -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
+2 -2
View File
@@ -2,7 +2,8 @@ setuptools>=33.1.1
Werkzeug>=1.0.1
wheel==0.33.6
gunicorn==20.1.0
requests==2.20.0
requests==2.24.0
urllib3=1.25.2
flask==2.0.3
flask-session==0.3.2
flask-helper==0.19
@@ -13,7 +14,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