diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 4ce9bac0..454ca42c 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