From 05e0aeae69d6fc06aa4b3155897b92e05c4fd63e Mon Sep 17 00:00:00 2001 From: Sebastian Zaremba <1636476+vassyz@users.noreply.github.com> Date: Mon, 30 Oct 2023 16:52:38 +0000 Subject: [PATCH] Update deprecated exponentially_longer method for Rails >= 7.1 This method is deprecated in Rails 7.1 and will be removed in Rails 7.2. https://github.com/rails/rails/blob/7-1-stable/activejob/CHANGELOG.md#rails-710rc1-september-27-2023 --- lib/dfe/analytics/analytics_job.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dfe/analytics/analytics_job.rb b/lib/dfe/analytics/analytics_job.rb index 439c71c2..01661266 100644 --- a/lib/dfe/analytics/analytics_job.rb +++ b/lib/dfe/analytics/analytics_job.rb @@ -2,7 +2,9 @@ module DfE module Analytics class AnalyticsJob < ActiveJob::Base queue_as { DfE::Analytics.config.queue } - retry_on StandardError, wait: :exponentially_longer, attempts: 5 + + wait_option = Rails::VERSION::STRING >= '7.1' ? :polynomially_longer : :exponentially_longer + retry_on StandardError, wait: wait_option, attempts: 5 end end end