by resources of a single device. Distributing has no resources limitation, since it run on many devices. Parallel batch handles everything to distribute your batches across servers.
records.each { |record| perform(record) } end end def next_batch transaction do reload(lock: true) next unless (records = find_records).last update_attributes!(offset: records.last.id) records end end end