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

Unit of work #498

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Unit of work #498

wants to merge 11 commits into from

Conversation

Rotheem
Copy link
Contributor

@Rotheem Rotheem commented Jul 30, 2024

Description

Please explain the changes you made here.

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the documentation, if necessary

Copy link

codecov bot commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 73.07692% with 7 lines in your changes missing coverage. Please review.

Project coverage is 81.79%. Comparing base (51dc533) to head (da4dd8e).

Files Patch % Lines
app/types/transactional_async_session.py 66.66% 5 Missing ⚠️
app/dependencies.py 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #498      +/-   ##
==========================================
- Coverage   81.81%   81.79%   -0.02%     
==========================================
  Files         125      126       +1     
  Lines        9469     9492      +23     
==========================================
+ Hits         7747     7764      +17     
- Misses       1722     1728       +6     

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



async def create_flappybird_best_score(
db: AsyncSession,
db: TransactionalAsyncSession,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
db: TransactionalAsyncSession,
db: AsyncSession,

@@ -48,33 +49,29 @@ async def get_flappybird_score_position(


async def create_flappybird_score(
db: AsyncSession,
db: TransactionalAsyncSession,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
db: TransactionalAsyncSession,
db: AsyncSession,

Comment on lines +91 to +92
# The use of transactional database requires the use of NullPool as it implies the use of a db in multiple run loops
# https://docs.sqlalchemy.org/en/14/orm/extensions/asyncio.html#using-multiple-asyncio-event-loops
Copy link
Member

Choose a reason for hiding this comment

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

We need to clear the usage of NullPool up. This should not break tests as this dependency should not be called during tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants