Skip to content

Commit

Permalink
Fix river.JobStateAvailable reference in cmd/river/ (#315)
Browse files Browse the repository at this point in the history
* Fix `river.JobStateAvailable` reference in `cmd/river/` (Should be `rivertype`)
* Update godoc references to `river.JobState*`
  • Loading branch information
dhermes authored Apr 23, 2024
1 parent bb240e7 commit 7c8b5ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/river/riverbench/river_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7c8b5ee

Please sign in to comment.