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

Allows you to set hkdb object to use in LoadSpec #1089

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

jlashner
Copy link
Contributor

@jlashner jlashner commented Jan 8, 2025

Max was finding that repeated calls to load_hk was eventually causing the number of connections to max out, due to the time it takes for hkdb.Session to be garbage collected.

This change allows you to manually pass in an HkDb instance to load_hk, avoiding repeated calls to sessionmaker if you are calling the function in a loop.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@jlashner jlashner requested a review from msilvafe January 8, 2025 22:13
Copy link
Contributor

@msilvafe msilvafe left a comment

Choose a reason for hiding this comment

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

Tested looping over calls to LoadSpec and it seemed to work well to reduce number of connections to the database.

@jlashner jlashner merged commit 1d53e95 into master Jan 14, 2025
3 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.

None yet

2 participants