diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index 856d1d570..1caa5b3ac 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -1,7 +1,7 @@ class ApplicationJob < ActiveJob::Base DEFAULT_MAX_ATTEMPTS_JOBS = 25 - retry_on Excon::Error::BadRequest + retry_on ::Excon::Error::BadRequest before_perform do |job| Rails.logger.info("#{job.class.name} started at #{Time.zone.now}") diff --git a/config/initializers/excon_setup.rb b/config/initializers/excon_setup.rb new file mode 100644 index 000000000..d269bc477 --- /dev/null +++ b/config/initializers/excon_setup.rb @@ -0,0 +1,3 @@ +# needed as ApplicationJob retry on excon error +# and this lib is not explicity loaded by the Gemfile +require 'excon'