Skip to content

Commit

Permalink
fixes mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Shershen committed Oct 17, 2024
1 parent aafe26b commit a657d8f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fastapi_async_sqlalchemy/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ def session(self) -> AsyncSession:

multi_sessions = _multi_sessions_ctx.get()
if multi_sessions:
"""If multi_sessions is True, we are in a context where multiple sessions are allowed.
In this case, we need to create a new session for each task.
""" In this case, we need to create a new session for each task.
We also need to commit the session on exit if commit_on_exit is True.
This is useful when we need to run multiple queries in parallel.
For example, when we need to run multiple queries in parallel in a route handler.
Expand Down

0 comments on commit a657d8f

Please sign in to comment.