diff options
author | Takeshi Umeda <noel.yoshiba@gmail.com> | 2021-05-09 17:40:17 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-09 10:40:17 +0200 |
commit | 9b18914c3572be5b661e4d8e31578fae4ee347be (patch) | |
tree | bdca05c193a2c9833c088939175cc7970cfc9856 /config/initializers | |
parent | f9c2d1b9a1c1e3f6b3d79b6d2edefe4f4f5cf2a6 (diff) |
Add a Redis environment variable for sidekiq (#16188)
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/sidekiq.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index fc85a3913..219554df4 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -1,14 +1,7 @@ # frozen_string_literal: true -namespace = ENV.fetch('REDIS_NAMESPACE') { nil } -redis_params = { url: ENV['REDIS_URL'], driver: :hiredis } - -if namespace - redis_params[:namespace] = namespace -end - Sidekiq.configure_server do |config| - config.redis = redis_params + config.redis = REDIS_SIDEKIQ_PARAMS config.server_middleware do |chain| chain.add SidekiqErrorHandler @@ -26,7 +19,7 @@ Sidekiq.configure_server do |config| end Sidekiq.configure_client do |config| - config.redis = redis_params + config.redis = REDIS_SIDEKIQ_PARAMS config.client_middleware do |chain| chain.add SidekiqUniqueJobs::Middleware::Client |