Method: Applicaster::Logger::Sidekiq#job_context
- Defined in:
- lib/applicaster/logger/sidekiq.rb
#job_context(item, queue) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/applicaster/logger/sidekiq.rb', line 31 def job_context(item, queue) { sidekiq: { # job ID jid: item['jid'], pid: ::Process.pid, # thread ID tid: ::Thread.current.object_id.to_s(36), # batch ID bid: item['bid'], # If we're using a wrapper class, like ActiveJob, use the "wrapped" # attribute to expose the underlying thing. class: (item['wrapped'] || item['class']).to_s, queue: queue, args: item['args'].inspect, } } end |