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])
| 26 | // Must be called from within a ResumableStep or ResumableStepCursor callback. |
| 27 | // The current step name to persist is read from context. |
| 28 | func 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 |
searching dependent graphs…