Class: Sidekiq::Batch::Middleware::ClientMiddleware

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/batch/middleware.rb

Instance Method Summary collapse

Instance Method Details

#call(_worker, msg, _queue, _redis_pool = nil) ⇒ Object


7
8
9
10
11
12
# File 'lib/sidekiq/batch/middleware.rb', line 7

def call(_worker, msg, _queue, _redis_pool = nil)
  if (batch = Thread.current[:batch])
    batch.increment_job_queue(msg['jid']) if (msg[:bid] = batch.bid)
  end
  yield
end