Summary: | C4::Search should only have one ZOOM event loop | ||
---|---|---|---|
Product: | Koha | Reporter: | Jared Camins-Esakov <jcamins> |
Component: | Architecture, internals, and plumbing | Assignee: | Jared Camins-Esakov <jcamins> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris, jonathan.druart, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Medium patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 9234, 9239 | ||
Attachments: |
Bug 9183: Refactor ZOOM event loop
[SIGNED-OFF] Bug 9183: Refactor ZOOM event loop Bug 9183: Refactor ZOOM event loop |
Description
Jared Camins-Esakov
2012-12-01 02:59:30 UTC
Created attachment 13807 [details] [review] Bug 9183: Refactor ZOOM event loop Prior to this patch, there were three identical ZOOM event loops in C4::Search. This is wasteful, and goes against all good programming practice. This patch refactors the ZOOM event loops into a separate subroutine which is called by SimpleSearch, searchResults, and GetDistinctValues call. The new routine, _ZOOM_event_loop process the ZOOM event loop and, once it has been fully processed, passes control to a closure provided by the calling routine for processing the results, and destroys the result sets. To test (after applying patch): 1) Do a regular bibliographic search that should return results. 2) Do a search in the Cataloging module that should return results. 3) If you get results from both searches, the patch works. Created attachment 13924 [details] [review] [SIGNED-OFF] Bug 9183: Refactor ZOOM event loop Prior to this patch, there were three identical ZOOM event loops in C4::Search. This is wasteful, and goes against all good programming practice. This patch refactors the ZOOM event loops into a separate subroutine which is called by SimpleSearch, searchResults, and GetDistinctValues call. The new routine, _ZOOM_event_loop process the ZOOM event loop and, once it has been fully processed, passes control to a closure provided by the calling routine for processing the results, and destroys the result sets. To test (after applying patch): 1) Do a regular bibliographic search that should return results. 2) Do a search in the Cataloging module that should return results. 3) If you get results from both searches, the patch works. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> QA Comments: I don't know very well this part of code but it seems good to me. I searched in the 2 places and I got results. Marked as Passed QA. Created attachment 14269 [details] [review] Bug 9183: Refactor ZOOM event loop Prior to this patch, there were three identical ZOOM event loops in C4::Search. This is wasteful, and goes against all good programming practice. This patch refactors the ZOOM event loops into a separate subroutine which is called by SimpleSearch, searchResults, and GetDistinctValues call. The new routine, _ZOOM_event_loop process the ZOOM event loop and, once it has been fully processed, passes control to a closure provided by the calling routine for processing the results, and destroys the result sets. To test (after applying patch): 1) Do a regular bibliographic search that should return results. 2) Do a search in the Cataloging module that should return results. 3) If you get results from both searches, the patch works. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> This patch has been pushed to master. Pushed to 3.10.x will be in 3.10.2 |