Method
insertJob
(ctx context.Context, tb testing.TB, tx TTx, args T, opts *river.InsertOpts)
Source from the content-addressed store, hash-verified
| 82 | } |
| 83 | |
| 84 | func (w *Worker[T, TTx]) insertJob(ctx context.Context, tb testing.TB, tx TTx, args T, opts *river.InsertOpts) (*rivertype.JobRow, error) { |
| 85 | tb.Helper() |
| 86 | |
| 87 | result, err := w.client.InsertTx(ctx, tx, args, opts) |
| 88 | if err != nil { |
| 89 | return nil, err |
| 90 | } |
| 91 | return result.Job, nil |
| 92 | } |
| 93 | |
| 94 | // Work inserts a job with the provided arguments and optional insert options, |
| 95 | // then works it. The transaction is used for all work-related database |
Tested by
no test coverage detected