Fix job max attempts

This commit is contained in:
Paul Chavard 2020-06-16 15:47:24 +02:00
parent 5970d43396
commit e89f0846bb
2 changed files with 2 additions and 2 deletions

View file

@ -10,6 +10,6 @@ class ApiEntreprise::Job < ApplicationJob
end
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

View file

@ -14,6 +14,6 @@ class ApplicationJob < ActiveJob::Base
end
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