Class: Sidekiq::Metrics::Middleware

Inherits:
Object
  • Object
show all
Includes:
ServerMiddleware
Defined in:
lib/sidekiq/metrics/tracking.rb

Instance Attribute Summary

Attributes included from ServerMiddleware

#config

Instance Method Summary collapse

Methods included from ServerMiddleware

#logger, #redis, #redis_pool

Constructor Details

#initialize(options) ⇒ Middleware

Returns a new instance of Middleware.



129
130
131
# File 'lib/sidekiq/metrics/tracking.rb', line 129

def initialize(options)
  @exec = options
end

Instance Method Details

#call(_instance, hash, queue, &block) ⇒ Object



133
134
135
# File 'lib/sidekiq/metrics/tracking.rb', line 133

def call(_instance, hash, queue, &block)
  @exec.track(queue, hash["wrapped"] || hash["class"], &block)
end