This allows us to recover from the condition with the broken connections.
This commit is contained in:
parent
5ac2900e63
commit
b8ab7da1a9
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue