class SidekiqUniqueJobs::Middleware::Client
@author Mikael Henriksson <mikael@mhenrixon.com>
The unique sidekiq middleware for the client push
def call(*, &block)
- Yield: - when the lock is successful
Yield: - when uniqueness is disable
Other tags:
- See: https://github.com/mperham/sidekiq/wiki/Middleware -
See: https://github.com/mperham/sidekiq/wiki/Job-Format -
See: SidekiqUniqueJobs::Middleware#call -
def call(*, &block) lock(&block) end
def lock
def lock lock_instance.lock do reflect(:locked, item) return yield end end