From 498ea113e09d7781a79ca67078de6bbc13bdf2f6 Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期二, 08 四月 2025 09:56:42 +0800 Subject: [PATCH] license同步任务 --- app/models/base_model.py | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/base_model.py b/app/models/base_model.py index 580f262..401063f 100644 --- a/app/models/base_model.py +++ b/app/models/base_model.py @@ -6,9 +6,8 @@ from app.config.config import settings -DATABASE_URL = os.getenv('DATABASE_URL') or settings.database_url - -engine = create_engine(DATABASE_URL, pool_size=20, max_overflow=50) +DATABASE_URL = settings.database_url +engine = create_engine(DATABASE_URL, pool_size=20, max_overflow=50, pool_recycle=3600) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() -- Gitblit v1.8.0