From 49aa426d1ba645ae17600007767ece7b1d61ca33 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 2 Sep 2020 16:59:54 +0200 Subject: [PATCH] application job swallow BadRequest error and retry --- app/jobs/application_job.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index 2dfbc497c..856d1d570 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -1,6 +1,8 @@ class ApplicationJob < ActiveJob::Base DEFAULT_MAX_ATTEMPTS_JOBS = 25 + retry_on Excon::Error::BadRequest + before_perform do |job| Rails.logger.info("#{job.class.name} started at #{Time.zone.now}") end