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

Use dedicated database session for constraint runner #5718

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

gmazoyer
Copy link
Contributor

Improvement for initial fix in #5704

@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label Feb 11, 2025
Copy link

codspeed-hq bot commented Feb 11, 2025

CodSpeed Performance Report

Merging #5718 will not alter performance

Comparing gma-20250211-5704-tweak (d78558d) with stable (4e27734)

Summary

✅ 11 untouched benchmarks

@gmazoyer gmazoyer marked this pull request as ready for review February 11, 2025 12:38
@gmazoyer gmazoyer requested a review from a team February 11, 2025 12:38
Copy link
Contributor

@ajtmccarty ajtmccarty left a comment

Choose a reason for hiding this comment

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

this is cool

if loop and loop.is_running():
loop.create_task(self._session.close())
else:
asyncio.run(self._session.close())
Copy link
Contributor

Choose a reason for hiding this comment

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

can you explain what this change does? is it so that we always clean up a session created with start_session()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you got the point. The other way would have been to close the session at the end of the create mutation. Not sure what people like best, and I don't have a strong opinion on this myself.

@gmazoyer gmazoyer merged commit 7da5c9f into stable Feb 11, 2025
31 checks passed
@gmazoyer gmazoyer deleted the gma-20250211-5704-tweak branch February 11, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants