summaryrefslogtreecommitdiffstats
path: root/app/lib/redis_configuration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/redis_configuration.rb')
-rw-r--r--app/lib/redis_configuration.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/lib/redis_configuration.rb b/app/lib/redis_configuration.rb
index e14d6c8b670..f0e86d985b8 100644
--- a/app/lib/redis_configuration.rb
+++ b/app/lib/redis_configuration.rb
@@ -7,9 +7,7 @@ class RedisConfiguration
@pool = ConnectionPool.new(size: new_pool_size) { new.connection }
end
- def with
- pool.with { |redis| yield redis }
- end
+ delegate :with, to: :pool
def pool
@pool ||= establish_pool(pool_size)
@@ -17,7 +15,7 @@ class RedisConfiguration
def pool_size
if Sidekiq.server?
- Sidekiq.options[:concurrency]
+ Sidekiq[:concurrency]
else
ENV['MAX_THREADS'] || 5
end