def reserve(limit: 1000)
      record_ids = Set.new
      while record_ids.size < limit && (record_id = Searchkick.with_redis { |r| r.rpop(redis_key) })
        record_ids << record_id
      end
      record_ids.to_a
    end
def reserve(limit: 1000)
      record_ids = Set.new
      while record_ids.size < limit && (record_id = Searchkick.with_redis { |r| r.rpop(redis_key) })
        record_ids << record_id
      end
      record_ids.to_a
    end
TODO use reliable queuing