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

Orders, alternative implementation: fetch and cache vendors only when needed #634

Closed
branchedelac opened this issue May 11, 2023 · 0 comments · Fixed by #636
Closed

Orders, alternative implementation: fetch and cache vendors only when needed #634

branchedelac opened this issue May 11, 2023 · 0 comments · Fixed by #636
Labels

Comments

@branchedelac
Copy link
Contributor

branchedelac commented May 11, 2023

An alternative to #516

Fetching all organizations may be unnecessarily time-consuming for libraries with many organizations (eg #631), but where not all organizations are associated with orders.

Perhaps it would be preferable to instead fetch organizations only if they are encountered in the legacy data, with a CQL query to search by code. In most cases this will mean more API calls to FOLIO, but they will be distributed across the process so should not cause too much load. Any organization that has already been fetched can also be cached and reused in case it is referenced in ore orders.

Compare with how users are fetched and cached in the feefine mapper:
https://github.com/FOLIO-FSE/folio_migration_tools/blob/ef76b4bdbd3814adb755cfafef0e8ca87fc3af36/src/folio_migration_tools/mapping_file_transformation/manual_fee_fines_mapper.py#LL236C9-L236C28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant