From 7c8b5eebc03ef4469fa6d981e572c97c83fd729b Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Mon, 22 Apr 2024 19:11:21 -0500 Subject: [PATCH] Fix `river.JobStateAvailable` reference in `cmd/river/` (#315) * Fix `river.JobStateAvailable` reference in `cmd/river/` (Should be `rivertype`) * Update godoc references to `river.JobState*` --- client.go | 4 ++-- cmd/river/riverbench/river_bench.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index 6382ac17..a5bcb1fa 100644 --- a/client.go +++ b/client.go @@ -1465,7 +1465,7 @@ type JobListResult struct { // provided context is used for the underlying Postgres query and can be used to // cancel the operation or apply a timeout. // -// params := river.NewJobListParams().WithLimit(10).State(river.JobStateCompleted) +// params := river.NewJobListParams().WithLimit(10).State(rivertype.JobStateCompleted) // jobRows, err := client.JobList(ctx, params) // if err != nil { // // handle error @@ -1498,7 +1498,7 @@ func (c *Client[TTx]) JobList(ctx context.Context, params *JobListParams) (*JobL // provided context is used for the underlying Postgres query and can be used to // cancel the operation or apply a timeout. // -// params := river.NewJobListParams().WithLimit(10).State(river.JobStateCompleted) +// params := river.NewJobListParams().WithLimit(10).State(rivertype.JobStateCompleted) // jobRows, err := client.JobListTx(ctx, tx, params) // if err != nil { // // handle error diff --git a/cmd/river/riverbench/river_bench.go b/cmd/river/riverbench/river_bench.go index 96cf8ffb..638dcd8f 100644 --- a/cmd/river/riverbench/river_bench.go +++ b/cmd/river/riverbench/river_bench.go @@ -194,7 +194,7 @@ func (b *Benchmarker[TTx]) Run(ctx context.Context) error { return case <-ticker.C: - numJobs, err := b.driver.GetExecutor().JobCountByState(ctx, river.JobStateAvailable) + numJobs, err := b.driver.GetExecutor().JobCountByState(ctx, rivertype.JobStateAvailable) if err != nil { b.logger.ErrorContext(ctx, "Error counting jobs", "err", err) continue