This allows us to recover from the condition with the broken connections.

This commit is contained in:
gluap 2022-02-14 22:34:01 +01:00 committed by Paul Bienkowski
parent 5ac2900e63
commit b8ab7da1a9

View file

@ -41,12 +41,12 @@ Base = declarative_base()
engine = None
sessionmaker = None
sessionmaker: SessionMaker
@asynccontextmanager
async def make_session():
async with sessionmaker() as session:
async with sessionmaker(autoflush=True) as session:
yield session