Skip to content

Commit 0da4e6a

Browse files
authored
Remove insert-only client section in the README (#1237)
Remove insert-only client section in the README and replace it with a link to specific docs on the subject. Insert-only clients aren't that important as a concept, and we streamline the README by getting rid of this section. Reflects the copy over in [1]. [1] riverqueue/homepage#409
1 parent 51699f5 commit 0da4e6a

1 file changed

Lines changed: 3 additions & 15 deletions

File tree

docs/README.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,6 @@ if err := riverClient.Start(ctx); err != nil {
8282
}
8383
```
8484

85-
## Insert-only clients
86-
87-
It's often desirable to have a client that'll be used for inserting jobs, but
88-
not working them. This is possible by omitting the `Queues` configuration, and
89-
skipping the call to `Start`:
90-
91-
```go
92-
riverClient, err := river.NewClient(riverpgxv5.New(dbPool), &river.Config{
93-
Workers: workers,
94-
})
95-
if err != nil {
96-
panic(err)
97-
}
98-
```
99-
10085
`Workers` can also be omitted, but it's better to include it so River can check
10186
that inserted job kinds have a worker that can run them.
10287

@@ -114,6 +99,9 @@ if err := riverClient.Stop(ctx); err != nil {
11499
There are some complexities around ensuring clients stop cleanly, but also in a
115100
timely manner. See [graceful shutdown] for more details on River's stop modes.
116101

102+
[Insert-only clients](/docs/insert-only-clients) will insert jobs, but not work
103+
them, and don't need to be started or stopped.
104+
117105
## Inserting jobs
118106

119107
[`Client.InsertTx`] is used in conjunction with an instance of job args to

0 commit comments

Comments
 (0)