Skip to content

Commit

Permalink
Improved code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshingYou1 committed Sep 6, 2024
1 parent 1ae7d57 commit 9162c50
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/sidekiq/hca/ezr_submission_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ class EzrSubmissionJob
include Sidekiq::Job
include SentryLogging
VALIDATION_ERROR = HCA::SOAPParser::ValidationError
STATSD_KEY_PREFIX = 'api.1010ezr'

sidekiq_options retry: 14

sidekiq_retries_exhausted do |msg, _e|
parsed_form = decrypt_form(msg['args'][0])

StatsD.increment("#{Form1010Ezr::Service::STATSD_KEY_PREFIX}.failed_wont_retry")
StatsD.increment("#{STATSD_KEY_PREFIX}.failed_wont_retry")

if parsed_form.present?
PersonalInformationLog.create!(
Expand Down Expand Up @@ -44,7 +45,7 @@ def perform(encrypted_form, user_uuid)
Form1010Ezr::Service.new(nil).log_submission_failure(parsed_form)
log_exception_to_sentry(e)
rescue
StatsD.increment("#{Form1010Ezr::Service::STATSD_KEY_PREFIX}.async.retries")
StatsD.increment("#{STATSD_KEY_PREFIX}.async.retries")
raise
end
end
Expand Down

0 comments on commit 9162c50

Please sign in to comment.