mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-04-02 07:01:56 +02:00
Revert "Wait until got session"
This reverts commit fa3d533354fb872904a84b42a31173193a3688c9.
This commit is contained in:
parent
fa3d533354
commit
b767df14c9
@ -33,13 +33,7 @@ class DatabaseInterface(object):
|
||||
|
||||
@contextmanager
|
||||
def get_session(self) -> Session:
|
||||
got_session = False
|
||||
while not got_session:
|
||||
try:
|
||||
session = self._sessionmaker() # type: Session
|
||||
got_session = True
|
||||
except:
|
||||
pass
|
||||
session = self._sessionmaker() # type: Session
|
||||
try:
|
||||
yield session
|
||||
session.commit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user