|
def _get_db_dependency() -> Iterator[Session]: |
Replace create_engine with create_async_engine
Replace Session and sessionmaker with AsyncSession and async_sessionmaker
Change DB dependency from Iterator to AsyncIterator
Update repositories to use await session.execute
Update service layer to await commit flush and refresh
Goal
Ensure non blocking database IO and consistent async flow