class Labkit::Middleware::Sidekiq::Client
This is a wrapper around all the sidekiq client-middleware in labkit The only middleware that needs to be added to the chain in GitLab-rails
It uses a new `Sidekiq::Middleware::Chain` to string multiple middlewares together.
Public Class Methods
chain()
click to toggle source
# File lib/labkit/middleware/sidekiq/client.rb, line 12 def self.chain @chain ||= ::Sidekiq::Middleware::Chain.new do |chain| chain.add Labkit::Middleware::Sidekiq::Context::Client chain.add Labkit::Middleware::Sidekiq::Tracing::Client if Labkit::Tracing.enabled? end end
Public Instance Methods
call(*args) { || ... }
click to toggle source
# File lib/labkit/middleware/sidekiq/client.rb, line 19 def call(*args) self.class.chain.invoke(*args) do yield end end