Method
Work
(ctx context.Context, job *river.Job[ReportingArgs])
Source from the content-addressed store, hash-verified
| 23 | } |
| 24 | |
| 25 | func (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
Tested by
no test coverage detected