Skip to content

Commit cbea99c

Browse files
committed
Use SortArgs in #insert_many examples as well
Although this wasn't strictly wrong given that the message was probably already clear, here follow up #44 to also use `SortArgs` in examples for batch insert with `#insert_many`.
1 parent df6ee83 commit cbea99c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ Use `#insert_many` to bulk insert jobs as a single operation for improved effici
9090

9191
```ruby
9292
num_inserted = client.insert_many([
93-
SimpleArgs.new(job_num: 1),
94-
SimpleArgs.new(job_num: 2)
93+
SortArgs.new(strings: ["whale", "tiger", "bear"]),
94+
SortArgs.new(strings: ["lion", "dolphin", "eagle"])
9595
])
9696
```
9797

9898
Or with `InsertManyParams`, which may include insertion options:
9999

100100
```ruby
101101
num_inserted = client.insert_many([
102-
River::InsertManyParams.new(SimpleArgs.new(job_num: 1), insert_opts: River::InsertOpts.new(max_attempts: 5)),
103-
River::InsertManyParams.new(SimpleArgs.new(job_num: 2), insert_opts: River::InsertOpts.new(queue: "high_priority"))
102+
River::InsertManyParams.new(SimpleArgs.new(strings: ["whale", "tiger", "bear"]), insert_opts: River::InsertOpts.new(max_attempts: 5)),
103+
River::InsertManyParams.new(SimpleArgs.new(strings: ["lion", "dolphin", "eagle"]), insert_opts: River::InsertOpts.new(queue: "high_priority"))
104104
])
105105
```
106106

0 commit comments

Comments
 (0)