Class: IuguLogger::JobLogger::Sidekiq
- Inherits:
-
Object
- Object
- IuguLogger::JobLogger::Sidekiq
- Defined in:
- lib/iugu_logger/job_logger.rb
Overview
Sidekiq server middleware. Compatible with sidekiq, sidekiq-pro, sidekiq-ent (msg payload format identical).
Instance Method Summary collapse
Instance Method Details
#call(_worker_instance, msg, queue) ⇒ Object
143 144 145 146 147 148 149 150 151 |
# File 'lib/iugu_logger/job_logger.rb', line 143 def call(_worker_instance, msg, queue) Adapter.new( job_class: msg['class'], job_id: msg['jid'], queue: queue, source: SOURCE_SIDEKIQ, attempt: (msg['retry_count'] || 0) + 1 ).call { yield } end |