Fix opening and closing Redis connections instead of using a pool (#18171)

* Fix opening and closing Redis connections instead of using a pool

* Fix Redis connections not being returned to the pool in CLI commands
This commit is contained in:
Eugen Rochko
2022-04-29 22:43:07 +02:00
committed by GitHub
parent 6476f7e4da
commit 7b0fe4aef9
8 changed files with 28 additions and 12 deletions

View File

@ -6,6 +6,6 @@ module Redisable
private
def redis
Thread.current[:redis] ||= RedisConfiguration.new.connection
Thread.current[:redis] ||= RedisConfiguration.pool.checkout
end
end