Skip to content

Commit

Permalink
Bump comments in the unique job example
Browse files Browse the repository at this point in the history
An incredibly trivial change to bump a few comments in the unique job
example in accordance to how they're written in our documentation. I
realized one of the comments implied that the job would be worked
exactly once which isn't a guarantee that we can actually make. Say that
insertion will be skipped instead.
  • Loading branch information
brandur authored and bgentry committed Nov 12, 2023
1 parent a3666f6 commit 541ee2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion example_unique_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,15 @@ func Example_uniqueJob() {
panic(err)
}

// First job insertion for account 1.
_, err = riverClient.Insert(ctx, ReconcileAccountArgs{AccountID: 1}, nil)
if err != nil {
panic(err)
}

// Job is inserted a second time, but it doesn't matter because its unique
// args ensure that it'll only run once per account per 24 hour period.
// args cause the insertion to be skipped because it's meant to only run
// once per account per 24 hour period.
_, err = riverClient.Insert(ctx, ReconcileAccountArgs{AccountID: 1}, nil)
if err != nil {
panic(err)
Expand Down

0 comments on commit 541ee2c

Please sign in to comment.