MarkOutboxCompleted marks an outbox entry as completed.
(ctx context.Context, id int64)
| 350 | |
| 351 | // MarkOutboxCompleted marks an outbox entry as completed. |
| 352 | func (d Datasource) MarkOutboxCompleted(ctx context.Context, id int64) error { |
| 353 | _, err := d.Conn.ExecContext(ctx, ` |
| 354 | UPDATE ledgerforge.lineage_outbox |
| 355 | SET status = $1, processed_at = NOW(), locked_until = NULL |
| 356 | WHERE id = $2 |
| 357 | `, model.OutboxStatusCompleted, id) |
| 358 | if err != nil { |
| 359 | return apierror.NewAPIError(apierror.ErrInternalServer, "Failed to mark outbox entry as completed", err) |
| 360 | } |
| 361 | return nil |
| 362 | } |
| 363 | |
| 364 | // MarkOutboxFailed marks an outbox entry as failed and increments the attempt counter. |
| 365 | // If attempts exceed max_attempts, the status becomes 'failed', otherwise it returns to 'pending' for retry. |
nothing calls this directly
no test coverage detected