diff --git a/config/initializers/heroku_redis.rb b/config/initializers/heroku_redis.rb new file mode 100644 index 0000000..59c4466 --- /dev/null +++ b/config/initializers/heroku_redis.rb @@ -0,0 +1,17 @@ +# Redis on Heroku needs no ssl +# https://devcenter.heroku.com/articles/connecting-heroku-redis#connecting-in-ruby +$redis = Redis.new(url: ENV["REDIS_URL"], 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 } + } +end + +Sidekiq.configure_client do |config| + config.redis = { + url: ENV["REDIS_URL"], + ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } + } +end