Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 74810 #16457

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions app/models/form526_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -408,19 +408,21 @@
#
def perform_ancillary_jobs(first_name)
workflow_batch = Sidekiq::Batch.new

workflow_batch.on(
:success,
'Form526Submission#workflow_complete_handler',
'submission_id' => id,
'first_name' => first_name
)

workflow_batch.jobs do
submit_uploads if form[FORM_526_UPLOADS].present?
submit_form_4142 if form[FORM_4142].present?
submit_form_0781 if form[FORM_0781].present?
submit_form_8940 if form[FORM_8940].present?
submit_uploads if form[FORM_526_UPLOADS].present?
submit_form_4142 if form[FORM_4142].present?

Check failure on line 421 in app/models/form526_submission.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/TrailingWhitespace: Trailing whitespace detected.
submit_form_0781 if form[FORM_0781].present?
submit_form_8940 if form[FORM_8940].present?
upload_bdd_instructions if bdd?
submit_flashes if form[FLASHES].present?
submit_flashes if form[FLASHES].present?
cleanup
end
end
Expand Down Expand Up @@ -503,7 +505,11 @@
end

def submit_form_4142
CentralMail::SubmitForm4142Job.perform_async(id)
if Flipper.enabled?(:submit_form_4142_using_lighthouse)
Lighthouse::SubmitForm4142Job.perform_async(id)
else
CentralMail::SubmitForm4142Job.perform_async(id)
end
end

def submit_form_0781
Expand Down
10 changes: 9 additions & 1 deletion app/sidekiq/central_mail/submit_form4142_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,24 @@
# @param submission_id [Integer] the {Form526Submission} id
#
def perform(submission_id)
if Flipper.enabled?(:submit_form_4142_using_lighthouse)
::Rails.logger.warn(
"Submission of Form 21-4142 via CentralMail is deprecated. Use Lighthouse",

Check failure on line 88 in app/sidekiq/central_mail/submit_form4142_job.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
{ submission_id: }
)
end

@submission_id = submission_id

Sentry.set_tags(source: '526EZ-all-claims')
super(submission_id)

with_tracking('Form4142 Submission', submission.saved_claim_id, submission.id) do
@pdf_path = processor.pdf_path
response = upload_to_central_mail
response = upload_to_central_mail
handle_service_exception(response) if response.present? && response.status.between?(201, 600)
end

Check failure on line 103 in app/sidekiq/central_mail/submit_form4142_job.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/TrailingWhitespace: Trailing whitespace detected.
rescue => e
# Cannot move job straight to dead queue dynamically within an executing job
# raising error for all the exceptions as sidekiq will then move into dead queue
Expand Down
Loading
Loading