feat(worker): lab5 add retries, DLQ registry and manual replay endpoint

This commit is contained in:
Голиков Maximillian Антон
2026-11-10 19:08:15 +03:00
parent dce767a156
commit f748c09e10
7 changed files with 84 additions and 0 deletions
@@ -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)