class SidekiqUniqueJobs::Lock::UntilAndWhileExecuting

def lock_on_failure

def lock_on_failure
  yield
rescue Exception # rubocop:disable Lint/RescueException
  log_error("Runtime lock failed to execute job, restoring server lock")
  lock
  raise
end