Skip to content

Commit

Permalink
separate monitor and service class references
Browse files Browse the repository at this point in the history
  • Loading branch information
danlim715 committed Sep 6, 2024
1 parent 46bfe50 commit 9ef7cb7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/sidekiq/lighthouse/create_intent_to_file_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ def perform(in_progress_form_id, veteran_icn, participant_id)

init(in_progress_form_id, veteran_icn)

itf_log_monitor ||= BenefitsClaims::IntentToFile::Monitor.new
service ||= BenefitsClaims::Service.new(icn)

itf_log_monitor.track_create_itf_begun(itf_type, form.created_at.to_s, form.user_account_id)
service.create_intent_to_file(itf_type, '')
itf_log_monitor.track_create_itf_success(itf_type, form.created_at.to_s, form.user_account_id)
Expand Down Expand Up @@ -104,5 +101,13 @@ def triage_rescued_error(veteran_icn, participant_id, e)
itf_log_monitor.track_invalid_itf_type(form, e)
end
end

def itf_log_monitor
@itf_log_monitor ||= BenefitsClaims::IntentToFile::Monitor.new
end

def service
@service ||= BenefitsClaims::Service.new(icn)
end
end
end

0 comments on commit 9ef7cb7

Please sign in to comment.