class SidekiqUniqueJobs::Lock::UntilExecuting

def lock(&block)

Returns:
  • (String, nil) - the locked jid when properly locked, else nil.

Other tags:
    Note: - Will call a conflict strategy if lock can't be achieved.
def lock(&block)
  unless (token = locksmith.lock)
    reflect(:lock_failed, item)
    call_strategy(origin: :client, &block)
    return
  end
  yield if block
  token
end