bw - fix redis error when using sessions and fix redis connection pool not used

This commit is contained in:
florian 2024-01-04 09:55:21 +01:00
parent d475a4e31e
commit 68b3d67857
No known key found for this signature in database
GPG key ID: 93EE47CC3D061500
2 changed files with 7 additions and 2 deletions

View file

@ -70,7 +70,8 @@ function clusterstore:initialize(pool)
role = "master",
sentinels = {}
}
if pool == nil or pool then
self.pool = pool == nil or pool
if self.pool then
options.connection_options.pool = "bw-redis"
options.connection_options.pool_size = tonumber(self.variables["REDIS_KEEPALIVE_POOL"])
end

View file

@ -73,7 +73,11 @@ function sessions:init()
if value == nil then
return self:ret(false, "can't get " .. k .. " variable : " .. err)
end
redis_vars[k] = value
if value == "" then
redis_vars[k] = nil
else
redis_vars[k] = value
end
end
-- Init configuration
local config = {