-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor status check job for decision review forms (#19426)
* Extract shared code for appeal status updates * Centralize handling of evidence and secondary forms * Use better associations * Update job names in cron entries
- Loading branch information
Showing
10 changed files
with
243 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'saved_claim_status_updater_job' | ||
|
||
module DecisionReview | ||
class HlrStatusUpdaterJob < SavedClaimStatusUpdaterJob | ||
private | ||
|
||
def records_to_update | ||
@higher_level_reviews ||= ::SavedClaim::HigherLevelReview.where(delete_date: nil).order(created_at: :asc) | ||
end | ||
|
||
def statsd_prefix | ||
'worker.decision_review.saved_claim_hlr_status_updater' | ||
end | ||
|
||
def log_prefix | ||
'DecisionReview::SavedClaimHlrStatusUpdaterJob' | ||
end | ||
|
||
def service_tag | ||
'service:higher-level-review' | ||
end | ||
|
||
def get_record_status(guid) | ||
decision_review_service.get_higher_level_review(guid).body | ||
end | ||
|
||
def evidence? | ||
false | ||
end | ||
|
||
def secondary_forms? | ||
false | ||
end | ||
|
||
def enabled? | ||
Flipper.enabled? :decision_review_saved_claim_hlr_status_updater_job_enabled | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'saved_claim_status_updater_job' | ||
|
||
module DecisionReview | ||
class NodStatusUpdaterJob < SavedClaimStatusUpdaterJob | ||
private | ||
|
||
def records_to_update | ||
@notice_of_disagreements ||= ::SavedClaim::NoticeOfDisagreement.where(delete_date: nil).order(created_at: :asc) | ||
end | ||
|
||
def statsd_prefix | ||
'worker.decision_review.saved_claim_nod_status_updater' | ||
end | ||
|
||
def log_prefix | ||
'DecisionReview::SavedClaimNodStatusUpdaterJob' | ||
end | ||
|
||
def service_tag | ||
'service:board-appeal' | ||
end | ||
|
||
def get_record_status(guid) | ||
decision_review_service.get_notice_of_disagreement(guid).body | ||
end | ||
|
||
def get_evidence_status(guid) | ||
decision_review_service.get_notice_of_disagreement_upload(guid:).body | ||
end | ||
|
||
def evidence? | ||
true | ||
end | ||
|
||
def secondary_forms? | ||
false | ||
end | ||
|
||
def enabled? | ||
Flipper.enabled? :decision_review_saved_claim_nod_status_updater_job_enabled | ||
end | ||
end | ||
end |
85 changes: 0 additions & 85 deletions
85
app/sidekiq/decision_review/saved_claim_hlr_status_updater_job.rb
This file was deleted.
Oops, something went wrong.
137 changes: 0 additions & 137 deletions
137
app/sidekiq/decision_review/saved_claim_nod_status_updater_job.rb
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.