From 2c5c2d6b5081df398ed5120e9bb4626b7b150337 Mon Sep 17 00:00:00 2001 From: Matt Almeida Date: Sun, 20 Oct 2024 08:01:15 -0400 Subject: [PATCH] Raise Redis timeout to handle Heroku... --- config/initializers/sidekiq.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 4ce9bac0..f0fe7a88 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -1,8 +1,10 @@ +redis = { + url: ENV["REDIS_URL"], timeout: 10.seconds, + ssl_params: {verify_mode: OpenSSL::SSL::VERIFY_NONE} +} + Sidekiq.configure_server do |config| - config.redis = { - url: ENV["REDIS_URL"], - ssl_params: {verify_mode: OpenSSL::SSL::VERIFY_NONE} - } + config.redis = redis config.capsule("AWS SES") do |capsule| # avoid rate limits Rails.configuration.action_mailer.deliver_later_queue_name = "SES" @@ -12,8 +14,5 @@ end Sidekiq.configure_client do |config| - config.redis = { - url: ENV["REDIS_URL"], - ssl_params: {verify_mode: OpenSSL::SSL::VERIFY_NONE} - } + config.redis = redis end