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

Function JobCancel

rivertype/execution_error.go:17–19  ·  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. This function primarily exists for cross module compatibility. Users shoul

(err error)

Source from the content-addressed store, hash-verified

15// This function primarily exists for cross module compatibility. Users should
16// use river.JobCancel instead.
17func JobCancel(err error) error {
18 return &JobCancelError{err: err}
19}
20
21// JobCancelError is the error type returned by JobCancel. It should not be
22// initialized directly, but is returned from the [JobCancel] function and can

Callers 3

JobCancelFunction · 0.92
TestJobExecutor_ExecuteFunction · 0.92
execution_error.goFile · 0.70

Calls

no outgoing calls

Tested by 1

TestJobExecutor_ExecuteFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…