Skip to content

Commit 72755ca

Browse files
authored
Merge pull request #13097 from colinux/fix-retry-delayed-purge-job
Tech: passe `DelayedPurgeJob` à 25 tentatives en cas d'erreur à la place du default de 5
2 parents dcbe997 + ba84a84 commit 72755ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/jobs/delayed_purge_job.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class DelayedPurgeJob < ApplicationJob
44
queue_as :low
55

66
# when storage is down, errors come in a variety of forms
7-
with_options(wait: :polynomially_longer) do
7+
with_options(wait: :polynomially_longer, attempts: MAX_ATTEMPTS_JOBS) do
88
retry_on Excon::Error::BadGateway
99
retry_on Excon::Error::ServiceUnavailable
1010
retry_on Excon::Error::InternalServerError
@@ -18,7 +18,7 @@ class DelayedPurgeJob < ApplicationJob
1818
end
1919

2020
# rate limit reached
21-
retry_on Excon::Error::TooManyRequests, wait: 10.minutes
21+
retry_on Excon::Error::TooManyRequests, wait: 10.minutes, attempts: MAX_ATTEMPTS_JOBS
2222

2323
# can discard
2424
discard_on ActiveRecord::RecordNotFound

0 commit comments

Comments
 (0)