class Labkit::Middleware::Sidekiq::Server
This is a wrapper around all the sidekiq server-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/server.rb, line 12 def self.chain @chain ||= ::Sidekiq::Middleware::Chain.new do |chain| chain.add Labkit::Middleware::Sidekiq::Context::Server chain.add Labkit::Middleware::Sidekiq::Tracing::Server if Labkit::Tracing.enabled? end end
Public Instance Methods
call(*args) { || ... }
click to toggle source
# File lib/labkit/middleware/sidekiq/server.rb, line 19 def call(*args) self.class.chain.invoke(*args) do yield end end