(ctx context.Context, job *river.Job[SnoozingArgs])
| 24 | } |
| 25 | |
| 26 | func (w *SnoozingWorker) Work(ctx context.Context, job *river.Job[SnoozingArgs]) error { |
| 27 | if job.Args.ShouldSnooze { |
| 28 | fmt.Println("snoozing job for 5 minutes") |
| 29 | return river.JobSnooze(5 * time.Minute) |
| 30 | } |
| 31 | return nil |
| 32 | } |
| 33 | |
| 34 | // Example_jobSnooze demonstrates how to snooze a job from within Work using |
| 35 | // JobSnooze. The job will be run again after 5 minutes and the snooze attempt |
nothing calls this directly
no test coverage detected