Skip to content

Commit

Permalink
Remove unique and reduce retries in SignUpServiceUpdaterJob (#16307)
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyanderson authored Apr 12, 2024
1 parent e9f1d47 commit 4320aaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions app/sidekiq/terms_of_use/sign_up_service_updater_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ module TermsOfUse
class SignUpServiceUpdaterJob
include Sidekiq::Job

sidekiq_options unique_for: 2.days
sidekiq_options retry: 15 # 2.1 days using exponential backoff
sidekiq_options retry: 5 # ~17 mins

sidekiq_retries_exhausted do |job, exception|
Rails.logger.warn(
Expand Down
6 changes: 2 additions & 4 deletions spec/sidekiq/terms_of_use/sign_up_service_updater_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
allow(Sidekiq::AttrPackage).to receive(:delete)
end

it 'retries 15 times after failure' do
expect(described_class.get_sidekiq_options['retry']).to eq(15)
it 'retries 5 times after failure' do
expect(described_class.get_sidekiq_options['retry']).to eq(5)
end

it 'logs a message when retries have been exhausted' do
Expand All @@ -45,8 +45,6 @@
)
end

it { is_expected.to be_unique }

context 'when the terms of use agreement is accepted' do
before do
allow(service_instance).to receive(:agreements_accept)
Expand Down

0 comments on commit 4320aaf

Please sign in to comment.