about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/sidekiq.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index d9eed4a9d..153173974 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -1,11 +1,10 @@
-redis_conn = proc {
-  $redis.dup
-}
+host = ENV['REDIS_HOST'] || 'localhost'
+port = ENV['REDIS_PORT'] || 6379
 
 Sidekiq.configure_server do |config|
-  config.redis = ConnectionPool.new(size: 5, &redis_conn)
+  config.redis = { host: host, port: port }
 end
 
 Sidekiq.configure_client do |config|
-  config.redis = ConnectionPool.new(size: 5, &redis_conn)
+  config.redis = { host: host, port: port }
 end