Class: Loggun::Modifiers::Sidekiq::ClientMiddleware

Inherits:
Object
  • Object
show all
Defined in:
lib/loggun/modifiers/sidekiq.rb

Instance Method Summary collapse

Instance Method Details

#call(worker_class, _msg, queue, _redis_pool) ⇒ Object



37
38
39
40
41
42
# File 'lib/loggun/modifiers/sidekiq.rb', line 37

def call(worker_class, _msg, queue, _redis_pool)
  yield.tap do |options|
    msg = "Job #{worker_class} JID-#{options['jid']} enqueued to `#{queue}`"
    Loggun.info('app.sidekiq.enqueued', msg, worker_class: worker_class, jid: options['jid'], queue: queue)
  end
end