Class: VBMS::SubmitDependentsPdfJob
- Inherits:
-
Object
- Object
- VBMS::SubmitDependentsPdfJob
- Includes:
- SentryLogging, Sidekiq::Job
- Defined in:
- app/sidekiq/vbms/submit_dependents_pdf_job.rb
Defined Under Namespace
Classes: Invalid686cClaim
Instance Attribute Summary collapse
-
#claim ⇒ Object
readonly
Returns the value of attribute claim.
Instance Method Summary collapse
-
#perform(saved_claim_id, va_file_number_with_payload, submittable_686_form, submittable_674_form) ⇒ Object
Generates PDF for 686c form and uploads to VBMS.
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger
Instance Attribute Details
#claim ⇒ Object (readonly)
Returns the value of attribute claim.
10 11 12 |
# File 'app/sidekiq/vbms/submit_dependents_pdf_job.rb', line 10 def claim @claim end |
Instance Method Details
#perform(saved_claim_id, va_file_number_with_payload, submittable_686_form, submittable_674_form) ⇒ Object
Generates PDF for 686c form and uploads to VBMS
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/sidekiq/vbms/submit_dependents_pdf_job.rb', line 18 def perform(saved_claim_id, va_file_number_with_payload, submittable_686_form, submittable_674_form) Rails.logger.info('VBMS::SubmitDependentsPdfJob running!', { saved_claim_id: }) @claim = SavedClaim::DependencyClaim.find(saved_claim_id) claim.add_veteran_info(va_file_number_with_payload) raise Invalid686cClaim unless claim.valid?(:run_686_form_jobs) generate_pdf(submittable_686_form, submittable_674_form) Rails.logger.info('VBMS::SubmitDependentsPdfJob succeeded!', { saved_claim_id: }) rescue => e Rails.logger.warn('VBMS::SubmitDependentsPdfJob failed, retrying...', { saved_claim_id:, error: e. }) send_error_to_sentry(e, saved_claim_id) @saved_claim_id = saved_claim_id raise end |