-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fewer queries when caching hearing request types #15478
Conversation
Code Climate has analyzed commit 3d9d49a and detected 0 issues on this pull request. View more on Code Climate. |
@@ -267,20 +267,34 @@ def case_fields_for_vacols_ids(vacols_ids) | |||
# ... | |||
# } | |||
VACOLS::Case.where(bfkey: vacols_ids).map do |vacols_case| | |||
legacy_appeal = AppealRepository.build_appeal(vacols_case) # build non-persisting legacy appeal object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call will load the legacy appeal, vacols folder, vacols correspondent, and vacols issues for each vacols case here when the vacols case actually has almost all the information we need!
…-of-veterans-affairs/caseflow into hschallhorn/ucaaj-performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! the logic looks correct and the tests are all passing
def original_hearing_request_type_for_vacols_case(vacols_case) | ||
request_type = VACOLS::Case::HEARING_REQUEST_TYPES[vacols_case.bfhr] | ||
|
||
(request_type == :travel_board && vacols_case.bfdocind == "V") ? :video : request_type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very short and concise!
Resolves #15426 ### Description - Moved `FetchHearingLocationsForVeteransJob` logic to `GeomatchService` - Moved `UpdateCachedAppealsAttributesJob` logic to `CachedAppealService` - Refactored some existing logic to get rid of some CodeClimate warnings. The remaining ones I think we can ignore - Add `Hearings::GeomatchAndCacheAppealJob`, and start it when completing `ChangeHearingRequestTypeTask` - Update and add tests - Resolves merge conflicts from #15482 and #15478 ### Acceptance Criteria - [x] When a user completes the "Convert hearing to virtual" action on a Travel Board hearing, it immediately shows up in the geo-matched RO queue ### Testing Plan 1. Login as BVASYELLOW 2. Go to http://localhost:3000/queue/appeals/1986897 3. Work the change appeal type task 4. Go to the schedule veteran page for St. Petersburg, and ensure the case shows up
Resolves some of the runtime issues for the update_cached_appeals_attributes_job
Description
Do not build an appeal for each vacols case we cache. This produced 4 calls to vacols for every single appeal we cache and makes the runtime of the job quite high.
Acceptance Criteria
Testing Plan
If you're feeling fun