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

Method Work

worker.go:76–76  ·  view source on GitHub ↗

Work performs the job and returns an error if the job failed. The context will be configured with a timeout according to the worker settings and may be cancelled for other reasons. If no error is returned, the job is assumed to have succeeded and will be marked completed. It is important for any w

(ctx context.Context, job *Job[T])

Source from the content-addressed store, hash-verified

74 // client has timed out the job or the job rescuer has moved it out of
75 // running.
76 Work(ctx context.Context, job *Job[T]) error
77}
78
79// WorkerDefaults is an empty struct that can be embedded in your worker

Callers 6

TestMiddlewareFunction · 0.95
TestWorker_WorkFunction · 0.95
TestResumableStepFunction · 0.65
TestResumableStepCursorFunction · 0.65
WorkMethod · 0.65

Implementers 2

callbackWorkUnitinternal/maintenance/job_rescuer_test.
customizableWorkUnitinternal/jobexecutor/job_executor_test

Calls

no outgoing calls

Tested by 5

TestMiddlewareFunction · 0.76
TestWorker_WorkFunction · 0.76
TestResumableStepFunction · 0.52
TestResumableStepCursorFunction · 0.52