From ff0ccbdb844a9fabe90b97bd43f9df22c363dd0d Mon Sep 17 00:00:00 2001 From: Brandur Date: Sun, 3 May 2026 12:24:29 -0400 Subject: [PATCH] Remove insert-only client section in the README 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] https://github.com/riverqueue/homepage/pull/409 --- docs/README.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/docs/README.md b/docs/README.md index 523b7a02..7945ada6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -82,21 +82,6 @@ if err := riverClient.Start(ctx); err != nil { } ``` -## Insert-only clients - -It's often desirable to have a client that'll be used for inserting jobs, but -not working them. This is possible by omitting the `Queues` configuration, and -skipping the call to `Start`: - -```go -riverClient, err := river.NewClient(riverpgxv5.New(dbPool), &river.Config{ - Workers: workers, -}) -if err != nil { - panic(err) -} -``` - `Workers` can also be omitted, but it's better to include it so River can check that inserted job kinds have a worker that can run them. @@ -114,6 +99,9 @@ if err := riverClient.Stop(ctx); err != nil { There are some complexities around ensuring clients stop cleanly, but also in a timely manner. See [graceful shutdown] for more details on River's stop modes. +[Insert-only clients](/docs/insert-only-clients) will insert jobs, but not work +them, and don't need to be started or stopped. + ## Inserting jobs [`Client.InsertTx`] is used in conjunction with an instance of job args to