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

Function ResumableSetStepTx

resumable_step_tx.go:28–30  ·  view source on GitHub ↗

ResumableSetStepTx immediately persists the current resumable step as part of transaction tx. If tx is rolled back, the step update will be as well. Normally, a resumable job's step progress is recorded after it runs along with its result status. This is normally sufficient, but because it happens

(ctx context.Context, tx TTx, job *Job[TArgs])

Source from the content-addressed store, hash-verified

26// Must be called from within a ResumableStep or ResumableStepCursor callback.
27// The current step name to persist is read from context.
28func ResumableSetStepTx[TDriver riverdriver.Driver[TTx], TTx any, TArgs JobArgs](ctx context.Context, tx TTx, job *Job[TArgs]) (*Job[TArgs], error) {
29 return resumableSetStepTx(ctx, tx, job, nil)
30}
31
32// ResumableSetStepCursorTx immediately persists the current resumable step and
33// cursor as part of transaction tx. If tx is rolled back, the step and cursor

Callers 2

WorkMethod · 0.92
TestResumableSetStepTxFunction · 0.85

Calls 1

resumableSetStepTxFunction · 0.85

Tested by 2

WorkMethod · 0.74
TestResumableSetStepTxFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…