Class: Sidekiq::Middleware::Client::RequestId

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

Instance Method Summary collapse

Constructor Details

#initialize(options = nil) ⇒ RequestId

Returns a new instance of RequestId.



5
6
7
# File 'lib/sidekiq/middleware/client/request_id.rb', line 5

def initialize(options = nil)
  @options = options || default_options
end

Instance Method Details

#call(worker, item, queue, redis_pool = nil) ⇒ Object



9
10
11
12
# File 'lib/sidekiq/middleware/client/request_id.rb', line 9

def call(worker, item, queue, redis_pool = nil)
  item[id_key] = id_value if id_value
  yield
end