MCPcopy Create free account
hub / github.com/riverqueue/river / insertJob

Method insertJob

rivertest/worker.go:84–92  ·  view source on GitHub ↗
(ctx context.Context, tb testing.TB, tx TTx, args T, opts *river.InsertOpts)

Source from the content-addressed store, hash-verified

82}
83
84func (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

Callers 1

WorkMethod · 0.95

Calls 2

InsertTxMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected