Class: EVSS::DisabilityCompensationForm::SubmitForm526Cleanup

Inherits:
Job
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
app/sidekiq/evss/disability_compensation_form/submit_form526_cleanup.rb

Constant Summary collapse

STATSD_KEY_PREFIX =
'worker.evss.submit_form526_cleanup'

Instance Method Summary collapse

Methods inherited from Job

#submission

Methods included from Sidekiq::Form526JobStatusTracker::JobTracker

#error_message, #job_success, #job_try, #klass, #log_error, #log_info, #metrics, #non_retryable_error_handler, #retryable_error_handler, #update_background_job_errors, #upsert_job_status, #with_tracking

Methods included from Sidekiq::Form526JobStatusTracker::BackupSubmission

#send_backup_submission_if_enabled

Methods included from SentryLogging

#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata

Instance Method Details

#perform(submission_id) ⇒ Object

Cleans up a 526 submission by removing its InProgressForm and deleting the active Intent to File record (via EVSS)

Parameters:



61
62
63
64
65
66
67
68
# File 'app/sidekiq/evss/disability_compensation_form/submit_form526_cleanup.rb', line 61

def perform(submission_id)
  Sentry.set_tags(source: '526EZ-all-claims')
  super(submission_id)
  with_tracking('Form526 Cleanup', submission.saved_claim_id, submission.id) do
    InProgressForm.find_by(form_id: FormProfiles::VA526ez::FORM_ID, user_uuid: submission.user_uuid)&.destroy
    EVSS::IntentToFile::ResponseStrategy.delete("#{submission.user_uuid}:compensation")
  end
end