fix 提高DB连接等待时间,避免database locked报错。

This commit is contained in:
jxxghp
2023-09-05 16:18:04 +08:00
parent 99218515ea
commit 6a08b4ba7f

View File

@ -11,7 +11,8 @@ Engine = create_engine(f"sqlite:///{settings.CONFIG_PATH}/user.db",
pool_size=1024,
pool_recycle=600,
pool_timeout=180,
max_overflow=0)
max_overflow=0,
connect_args={"timeout": 60})
# 会话工厂
SessionFactory = sessionmaker(autocommit=False, autoflush=False, bind=Engine)