Skip to content

Commit

Permalink
Adding 2 extra requirements to the backup submission (#11731)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylesoskin authored Feb 6, 2023
1 parent 59feee8 commit 42c20f7
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/sidekiq/form526_job_status_tracker/job_tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ def job_exhausted(msg, statsd_key_prefix)
new_error = {
"#{timestamp.to_i}": {
caller_method: __method__.to_s,
error_class: error_class,
error_message: error_message,
error_class: error_class, error_message: error_message,
timestamp: timestamp
}
}
Expand All @@ -54,7 +53,17 @@ def job_exhausted(msg, statsd_key_prefix)

backup_job_jid = nil
flipper_sym = :form526_backup_submission_temp_killswitch
if additional_birls_to_try.empty? && Settings.form526_backup.enabled && Flipper.enabled?(flipper_sym)

# Entry-point for backup 526 CMP submission
#
# Required criteria to send a backup 526 submission from here:
# Enabled in settings and flipper
# Is an overall submission and NOT an upload attempt
# Does not have a valid claim ID (through RRD process)
# Does not have additional birls it is going to try and submit under
if Settings.form526_backup.enabled && Flipper.enabled?(flipper_sym) &&
values[:job_class] == 'SubmitForm526AllClaim' && submission_obj.submitted_claim_id.nil? &&
additional_birls_to_try.empty?
backup_job_jid = Sidekiq::Form526BackupSubmissionProcess::Submit.perform_async(form526_submission_id)
end

Expand Down

0 comments on commit 42c20f7

Please sign in to comment.