|
|
|
@ -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 |
|
|
|
|