Solutionunvalidated
Avoid running multiple DB operations concurrently on the same session by removing asyncio.gather and iterating sequentially, and/or use an async_scoped_session so each task uses its own session.
f5e13a4f-e166-40bc-9a4d-17d071cb8831
Avoid running multiple DB operations concurrently on the same session by removing asyncio.gather and iterating sequentially, and/or use an async_scoped_session so each task uses its own session.