Merge pull request #5269 from tchak/fix-job-max-attempts

Fix job max attempts
This commit is contained in:
Paul Chavard 2020-06-16 16:17:57 +02:00 committed by GitHub
commit 8dcfdedc3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -10,6 +10,6 @@ class ApiEntreprise::Job < ApplicationJob
end end
def max_attempts def max_attempts
ENV[MAX_ATTEMPTS_API_ENTREPRISE_JOBS].to_i || DEFAULT_MAX_ATTEMPTS_API_ENTREPRISE_JOBS ENV.fetch("MAX_ATTEMPTS_API_ENTREPRISE_JOBS", DEFAULT_MAX_ATTEMPTS_API_ENTREPRISE_JOBS).to_i
end end
end end

View file

@ -14,6 +14,6 @@ class ApplicationJob < ActiveJob::Base
end end
def max_attempts def max_attempts
ENV["MAX_ATTEMPTS_JOBS"].to_i || DEFAULT_MAX_ATTEMPTS_JOBS ENV.fetch("MAX_ATTEMPTS_JOBS", DEFAULT_MAX_ATTEMPTS_JOBS).to_i
end end
end end