lib/job-iteration/enumerator_builder.rb
def build_lock_queue_enumerator(lock_queue, at_most_once:)
      unless lock_queue.is_a?(BackgroundQueue::LockQueue::RedisQueue) ||
          lock_queue.is_a?(BackgroundQueue::LockQueue::RolloutRedisQueue)
        raise ArgumentError, "an argument to #build_lock_queue_enumerator must be a LockQueue"
      end
      wrap(self, BackgroundQueue::LockQueueEnumerator.new(lock_queue, at_most_once: at_most_once).to_enum)
    end
def build_lock_queue_enumerator(lock_queue, at_most_once:)
      unless lock_queue.is_a?(BackgroundQueue::LockQueue::RedisQueue) ||
          lock_queue.is_a?(BackgroundQueue::LockQueue::RolloutRedisQueue)
        raise ArgumentError, "an argument to #build_lock_queue_enumerator must be a LockQueue"
      end
      wrap(self, BackgroundQueue::LockQueueEnumerator.new(lock_queue, at_most_once: at_most_once).to_enum)
    end
Builds Enumerator from a lock queue instance that belongs to a job.
 The helper is only to be used from jobs that use LockQueue module.