Class: SidekiqUniqueJobs::Server::Middleware

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
OptionsWithFallback
Defined in:
lib/sidekiq_unique_jobs/server/middleware.rb

Instance Method Summary collapse

Methods included from OptionsWithFallback

included, #lock, #lock_cache, #lock_cache=, #lock_class, #lock_type, #lock_type_from, #log_duplicate_payload?, #options, #unique_disabled?, #unique_enabled?, #unique_lock

Instance Method Details

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


12
13
14
15
16
17
18
19
# File 'lib/sidekiq_unique_jobs/server/middleware.rb', line 12

def call(worker, item, queue, redis_pool = nil, &blk)
  @worker = worker
  @redis_pool = redis_pool
  @queue = queue
  @item = item
  return yield unless unique_enabled?
  lock.send(:execute, after_unlock_hook, &blk)
end