Module: Sidekiq::Batch::Middleware

Defined in:
lib/sidekiq/batch/middleware.rb

Defined Under Namespace

Classes: ClientMiddleware, ServerMiddleware

Class Method Summary collapse

Class Method Details

.configureObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/sidekiq/batch/middleware.rb', line 35

def self.configure
  Sidekiq.configure_client do |config|
    config.client_middleware do |chain|
      chain.add Sidekiq::Batch::Middleware::ClientMiddleware
    end
  end
  Sidekiq.configure_server do |config|
    config.client_middleware do |chain|
      chain.add Sidekiq::Batch::Middleware::ClientMiddleware
    end
    config.server_middleware do |chain|
      chain.add Sidekiq::Batch::Middleware::ServerMiddleware
    end
  end
  Sidekiq::Worker.send(:include, Sidekiq::Batch::Extension::Worker)
end