Skip to content

Commit

Permalink
Merge pull request #30236 from padi/find-each-example-update
Browse files Browse the repository at this point in the history
Completes ActiveRecord::Batches.find_each example [ci skip]
  • Loading branch information
rafaelfranca committed Aug 14, 2017
2 parents 1e73c1d + 7afde4b commit 0864735
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion activerecord/lib/active_record/relation/batches.rb
Expand Up @@ -47,7 +47,12 @@ module Batches
# handle from 10000 and beyond by setting the +:start+ and +:finish+
# option on each worker.
#
# # Let's process from record 10_000 on.
# # In worker 1, let's process until 9999 records.
# Person.find_each(finish: 9_999) do |person|
# person.party_all_night!
# end
#
# # In worker 2, let's process from record 10_000 and onwards.
# Person.find_each(start: 10_000) do |person|
# person.party_all_night!
# end
Expand Down

0 comments on commit 0864735

Please sign in to comment.