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

[#469] Reduce db/HTTP connections #626

Merged
merged 5 commits into from
Jan 27, 2025

Conversation

SilviaAmAm
Copy link
Collaborator

@SilviaAmAm SilviaAmAm commented Jan 21, 2025

Fixes #469

I notices that there is quite a lot of duplication between the tasks retrieve_and_cache_zaken_from_openzaak and resync_zaken.

I will make a separate PR to refactor that, to make it easier to review. #627

@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.32%. Comparing base (c583f69) to head (369489e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #626      +/-   ##
==========================================
- Coverage   88.35%   88.32%   -0.03%     
==========================================
  Files         210      210              
  Lines        6043     6074      +31     
  Branches      639      639              
==========================================
+ Hits         5339     5365      +26     
- Misses        704      709       +5     
Flag Coverage Δ
backend 91.44% <100.00%> (+0.04%) ⬆️
jest 32.81% <ø> (ø)
storybook 79.70% <ø> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@svenvandescheur svenvandescheur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should assert for the reduces queries (if we actually we use less queries), if it's just the connections it's ok.

@SilviaAmAm SilviaAmAm force-pushed the fix/469-reduce-db-connections branch from eb9108b to 8025100 Compare January 23, 2025 10:53
- Avoid retrieving the selectielijst service for each zaak
- Take advantage of connection pooling by sharing client between zaken
@SilviaAmAm SilviaAmAm force-pushed the fix/469-reduce-db-connections branch from 8025100 to 5507b62 Compare January 24, 2025 10:30
@svenvandescheur svenvandescheur merged commit 20ed740 into main Jan 27, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce number of DB connections when resyncing zaken
3 participants