fix 部分数据库操作没有Commit

This commit is contained in:
jxxghp
2023-09-05 16:12:43 +08:00
parent c3a0a839c3
commit 99218515ea
4 changed files with 9 additions and 6 deletions

View File

@ -8,8 +8,9 @@ Engine = create_engine(f"sqlite:///{settings.CONFIG_PATH}/user.db",
pool_pre_ping=True,
echo=False,
poolclass=QueuePool,
pool_size=1000,
pool_recycle=60 * 10,
pool_size=1024,
pool_recycle=600,
pool_timeout=180,
max_overflow=0)
# 会话工厂
SessionFactory = sessionmaker(autocommit=False, autoflush=False, bind=Engine)
@ -33,7 +34,6 @@ def get_db():
class DbOper:
_db: Session = None
def __init__(self, db: Session = None):