class Sidekiq::TrackableBatch::Middleware::Client

@api private

Public Instance Methods

call(worker_class, msg, _queue, _redis_pool) { || ... } click to toggle source
# File lib/sidekiq/trackable_batch/middleware.rb, line 7
def call(worker_class, msg, _queue, _redis_pool)
  trackable_batch = Thread.current[:tbatch]
  if trackable_batch
    msg['max'] = Object.const_get(worker_class).max
    out = yield
    trackable_batch.register_job(out) if out
    return out
  end
  yield
end