Skip to content

Commit

Permalink
Update deprecated exponentially_longer method for Rails >= 7.1
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zarembas committed Oct 30, 2023
1 parent fe73499 commit 05e0aea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/dfe/analytics/analytics_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 05e0aea

Please sign in to comment.