Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Étienne Barrié <[email protected]>
  • Loading branch information
adrianna-chang-shopify and etiennebarrie authored Jun 3, 2021
1 parent 76f79f1 commit c826f58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ My Title,Hello World!

The Maintenance Tasks gem supports processing Active Records in batches. This
can reduce the number of calls your Task makes to the database. Use
`ActiveRecord::Batches#in_batches` to specify that your Task should process
records in batches. Active Record defaults to 1000 records, but a custom size can be
`ActiveRecord::Batches#in_batches` on the relation returned by your collection to specify that your Task should process
batches instead of records. Active Record defaults to 1000 records by batch, but a custom size can be
specified.

```ruby
Expand Down Expand Up @@ -149,7 +149,7 @@ operation such as `#update_all` or `#delete_all`. If you need to iterate over
individual records, you should define a collection that [returns an
`ActiveRecord::Relation`](#creating-a-task). This uses batching
internally, but loads the records with one SQL query. Conversely, batch
collections load the primary keys first, and then perform a query to load the
collections load the primary keys of the records of the batch first, and then perform an additional query to load the
records when calling `each` (or any `Enumerable` method) inside `#process`.

### Throttling
Expand Down

0 comments on commit c826f58

Please sign in to comment.