配置连接池

This commit is contained in:
zk
2026-07-15 16:14:31 +08:00
parent 54e415b5aa
commit ca227ebef7
5 changed files with 30 additions and 2 deletions
+5 -2
View File
@@ -14,7 +14,7 @@ class Settings(BaseSettings):
pg_password: str = ""
pg_db: str = "postgres"
pg_pool_size: int = 10
pg_max_overflow: int = 20
pg_max_overflow: int = 10
# ──────────── MySQL(业务库)────────────
db_host: str = "192.168.31.105"
@@ -23,7 +23,10 @@ class Settings(BaseSettings):
db_password: str = "123456"
db_name: str = "offerpie"
mysql_pool_size: int = 10
mysql_max_overflow: int = 20
mysql_max_overflow: int = 10
# 连接池获取连接的等待超时(秒),两个数据源共用
db_pool_timeout: int = 30
# ──────────── AI 供应商 ────────────
# 火山引擎(OpenAI 兼容风格)