From e455204e289dbfa815a63d6830e5669ae9ef5c3b Mon Sep 17 00:00:00 2001 From: "Eric D. Helms" Date: Mon, 9 Oct 2023 20:42:41 -0400 Subject: [PATCH] Fixes #36815: Set Redis reconnect_attempts to default --- config/application.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/application.rb b/config/application.rb index 86db333b7f6e..11617874b556 100644 --- a/config/application.rb +++ b/config/application.rb @@ -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