feat(worker): lab5 add retries, DLQ registry and manual replay endpoint
This commit is contained in:
@@ -39,4 +39,13 @@ func (r *FailedJobRepo) Resolve(ctx context.Context, attachmentID string, resolu
|
||||
return mapError(err)
|
||||
}
|
||||
|
||||
func (r *FailedJobRepo) ResolveInTx(ctx context.Context, tx domain.Tx, id string) error {
|
||||
const q = `
|
||||
UPDATE failed_jobs
|
||||
SET resolved_at = now(), resolution = 'manual_replay'
|
||||
WHERE attachment_id = $1::uuid AND resolved_at IS NULL
|
||||
`
|
||||
return tx.Exec(ctx, q, id)
|
||||
}
|
||||
|
||||
var _ domain.FailedJobRepository = (*FailedJobRepo)(nil)
|
||||
|
||||
Reference in New Issue
Block a user