From 6a08b4ba7fa7da81e4627aee0c7c37d7330bde92 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 5 Sep 2023 16:18:04 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=8F=90=E9=AB=98DB=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E7=AD=89=E5=BE=85=E6=97=B6=E9=97=B4=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?database=20locked=E6=8A=A5=E9=94=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/db/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/db/__init__.py b/app/db/__init__.py index e18a61e8..da335492 100644 --- a/app/db/__init__.py +++ b/app/db/__init__.py @@ -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)