class Sidekiq::Ichnite::ClientMiddleware
Public Instance Methods
call(worker_class, msg, queue, _redis_pool) { || ... }
click to toggle source
# File lib/ichnite/sidekiq/middleware.rb, line 36 def call(worker_class, msg, queue, _redis_pool) context = { queue: queue, job_id: Sidekiq::Ichnite.job_id(msg), job_class: Sidekiq::Ichnite.job_class(msg) } if at = msg['at'] context[:scheduled_at] = Time.at(at).utc ::Ichnite.log('job_schedule', context) else context[:args] = Sidekiq::Ichnite.job_args(msg) ::Ichnite.log('job_enqueue', context) end yield end