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

Function JobSnooze

error.go:43–45  ·  view source on GitHub ↗

JobSnooze can be returned from a Worker's Work method to cause the job to be tried again after the specified duration. This will not increment the job's Attempt count, meaning that jobs can be repeatedly snoozed without ever being discarded. A special duration of zero can be used to make the job im

(duration time.Duration)

Source from the content-addressed store, hash-verified

41//
42// Panics if duration is < 0.
43func JobSnooze(duration time.Duration) error {
44 return &rivertype.JobSnoozeError{Duration: duration}
45}
46
47// QueueAlreadyAddedError is returned when attempting to add a queue that has
48// already been added to the Client.

Callers 3

WorkMethod · 0.92
TestWorker_WorkFunction · 0.92
Test_Client_CommonFunction · 0.85

Calls

no outgoing calls

Tested by 3

WorkMethod · 0.74
TestWorker_WorkFunction · 0.74
Test_Client_CommonFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…