diff --git a/config/cable.yml b/config/cable.yml index 4c30fcd13..cd363f0d5 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -1,7 +1,7 @@ development: adapter: redis url: <%= ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379') %> - password: <%= ENV.fetch('REDIS_PASSWORD', nil) %> + password: <%= ENV.fetch('REDIS_PASSWORD', nil).presence %> test: adapter: test @@ -9,9 +9,9 @@ test: staging: adapter: redis url: <%= ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379') %> - password: <%= ENV.fetch('REDIS_PASSWORD', nil) %> + password: <%= ENV.fetch('REDIS_PASSWORD', nil).presence %> production: adapter: redis url: <%= ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379') %> - password: <%= ENV.fetch('REDIS_PASSWORD', nil) %> + password: <%= ENV.fetch('REDIS_PASSWORD', nil).presence %> diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb index 7b2ec56e4..6b70bd6c6 100644 --- a/config/initializers/redis.rb +++ b/config/initializers/redis.rb @@ -1,6 +1,6 @@ app_redis_config = { - url: URI.parse(ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379')), - password: ENV.fetch('REDIS_PASSWORD', nil) + url: URI.parse(ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379')), + password: ENV.fetch('REDIS_PASSWORD', nil).presence } redis = Rails.env.test? ? MockRedis.new : Redis.new(app_redis_config) Nightfury.redis = Redis::Namespace.new('reports', redis: redis) diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 8fbdb40f7..8b535874e 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -1,6 +1,6 @@ sidekiq_redis_config = { url: ENV.fetch('REDIS_URL', 'redis://127.0.0.1:6379'), - password: ENV.fetch('REDIS_PASSWORD', nil) + password: ENV.fetch('REDIS_PASSWORD', nil).presence } Sidekiq.configure_client do |config|