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

Method Work

example_queue_pause_test.go:25–32  ·  view source on GitHub ↗
(ctx context.Context, job *river.Job[ReportingArgs])

Source from the content-addressed store, hash-verified

23}
24
25func (w *ReportingWorker) Work(ctx context.Context, job *river.Job[ReportingArgs]) error {
26 select {
27 case <-ctx.Done():
28 return ctx.Err()
29 case w.jobWorkedCh <- job.Queue:
30 return nil
31 }
32}
33
34// Example_queuePause demonstrates how to pause queues to prevent them from
35// working new jobs, and later resume them.

Callers

nothing calls this directly

Calls 2

DoneMethod · 0.80
ErrMethod · 0.45

Tested by

no test coverage detected