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 10, 2023
1 parent a406cf2 commit e455204
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,14 @@ 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 e455204

Please sign in to comment.