Skip to content

Commit

Permalink
fix a4992dd ("fix: pgqueue: Add utils.Retriable to test weither an er…
Browse files Browse the repository at this point in the history
…ror is retriable", 2023-10-16)
  • Loading branch information
vincentvaroquauxads committed Sep 20, 2024
1 parent 4e745a1 commit 696ee80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interface/messaging/pgqueue/pgqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (p *Publisher) publish(ctx context.Context, retry int, data ...[]byte) erro
for _, d := range data {
jobID, err := p.worker.EnqueueJob(p.queueName, d, opts...)
if err != nil {
if !utils.Retriable(err) || p.maxRetries >= retry {
if !utils.Retriable(err) || retry >= p.maxRetries {
return fmt.Errorf("pgQueue.Publish: %w", err)
}
retryIds = append(retryIds, jobID)
Expand Down

0 comments on commit 696ee80

Please sign in to comment.