simpler retry strategy

This commit is contained in:
Untone 2021-07-30 18:57:11 +03:00
parent 1fab421a07
commit 23aebda1ab

View File

@ -12,11 +12,12 @@ from orm._retry import RetryingQuery
engine = create_engine(DB_URL,
convert_unicode=True,
echo=False,
pool_size=10,
max_overflow=2,
pool_recycle=300,
#pool_size=10,
#max_overflow=2,
#pool_recycle=300,
pool_pre_ping=True,
pool_use_lifo=True)
#pool_use_lifo=True
)
Session = sessionmaker(autocommit=False, autoflush=False, bind=engine, query_cls=RetryingQuery)
#Session = sessionmaker(autocommit=False, autoflush=False, bind=engine)