mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 14:37:02 +01:00
Revert "Keep trying until session obtained"
This reverts commit 5364cf9004
.
This commit is contained in:
parent
5364cf9004
commit
e0b18fb94f
@ -33,12 +33,7 @@ class DatabaseInterface(object):
|
|||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def get_session(self) -> Session:
|
def get_session(self) -> Session:
|
||||||
session = None
|
session = self._sessionmaker() # type: Session
|
||||||
while session == None:
|
|
||||||
try:
|
|
||||||
session = self._sessionmaker() # type: Session
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
try:
|
try:
|
||||||
yield session
|
yield session
|
||||||
session.commit()
|
session.commit()
|
||||||
|
Loading…
Reference in New Issue
Block a user