Skip to content

Commit

Permalink
Fixes #36815: Set Redis reconnect_attempts to default
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Oct 17, 2023
1 parent a406cf2 commit 9085997
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,13 @@ class Application < Rails::Application
if (rails_cache_settings && rails_cache_settings[:type] == 'redis')
options = [:redis_cache_store]
redis_urls = Array.wrap(rails_cache_settings[:urls])
options << { namespace: 'foreman', url: redis_urls }.merge(rails_cache_settings[:options] || {})

options << {
namespace: 'foreman',
url: redis_urls,
reconnect_attempts: ::Redis::Client::DEFAULTS[:reconnect_attempts],
}.merge(rails_cache_settings[:options] || {})

config.cache_store = options
Foreman::Logging.logger('app').info "Rails cache backend: Redis"
else
Expand Down

0 comments on commit 9085997

Please sign in to comment.