Skip to content

Commit

Permalink
Add require statements to client initialization example (#21)
Browse files Browse the repository at this point in the history
Make the client initialization example more useful by adding `require`
statements to help users see the entirety of the code they need to write
to make it work. Also change Sequel to ActiveRecord to match a change
that was made to the homepage docs.
  • Loading branch information
brandur authored Jul 5, 2024
1 parent afe184c commit 7e36d7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ gem "riverqueue-sequel"
Initialize a client with:

```ruby
require "riverqueue"
require "riverqueue-activerecord"

DB = Sequel.connect("postgres://...")
client = River::Client.new(River::Driver::Sequel.new(DB))
client = River::Client.new(River::Driver::ActiveRecord.new)
```

Define a job and insert it:
Expand Down

0 comments on commit 7e36d7b

Please sign in to comment.