Class: Faktory::Middleware::Batch::Client

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

Instance Method Summary collapse

Instance Method Details

#call(payload, pool) ⇒ Object



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

def call(payload, pool)
  b = Thread.current[:faktory_batch]
  if b
    payload["custom"] ||= {}
    payload["custom"]["bid"] = b.bid
  end
  yield
end