From 5eff7ec9d00fa835a76c354bad7cc7f284d28b11 Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期四, 26 十二月 2024 13:51:27 +0800 Subject: [PATCH] 新增用户增加rg数据同步 --- app/models/base_model.py | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/models/base_model.py b/app/models/base_model.py index 969c9c3..4f66ee2 100644 --- a/app/models/base_model.py +++ b/app/models/base_model.py @@ -1,12 +1,13 @@ +import os + from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, Session from app.config.config import settings -DATABASE_URL = settings.database_url - -engine = create_engine(DATABASE_URL) +DATABASE_URL = settings.database_url +engine = create_engine(DATABASE_URL, pool_size=20, max_overflow=50) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) Base = declarative_base() -- Gitblit v1.8.0