diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 6d7a3b1eb..4829dd515 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -1,7 +1,17 @@ +require "sidekiq/pausable" + sidekiq_redis = { url: $redis.url, namespace: 'sidekiq' } +Sidekiq.configure_client do |config| + config.redis = sidekiq_redis +end + Sidekiq.configure_server do |config| config.redis = sidekiq_redis + # add our pausable middleware + config.server_middleware do |chain| + chain.add Sidekiq::Pausable + end end if Sidekiq.server? @@ -32,6 +42,4 @@ if Sidekiq.server? end end -Sidekiq.configure_client { |config| config.redis = sidekiq_redis } Sidekiq.logger.level = Logger::WARN -