MCPcopy Index your code
hub / github.com/riverqueue/river / JobCancel

Function JobCancel

error.go:21–23  ·  view source on GitHub ↗

JobCancel wraps err and can be returned from a Worker's Work method to cancel the job at the end of execution. Regardless of whether or not the job has any remaining attempts, this will ensure the job does not execute again.

(err error)

Source from the content-addressed store, hash-verified

19// the job at the end of execution. Regardless of whether or not the job has any
20// remaining attempts, this will ensure the job does not execute again.
21func JobCancel(err error) error {
22 return rivertype.JobCancel(err)
23}
24
25// JobSnoozeError is the error type returned by JobSnooze. It should not be
26// initialized directly, but is returned from the [JobSnooze] function and can

Callers 6

WorkMethod · 0.92
WorkMethod · 0.92
TestJobCancelFunction · 0.92
TestWorker_WorkFunction · 0.92
Test_Client_CommonFunction · 0.70

Calls 1

JobCancelFunction · 0.92

Tested by 6

WorkMethod · 0.74
WorkMethod · 0.74
TestJobCancelFunction · 0.74
TestWorker_WorkFunction · 0.74
Test_Client_CommonFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…