From 59b1abccb3a9d5a786a6211535f35c29704334e8 Mon Sep 17 00:00:00 2001 From: RTAkland Date: Thu, 29 Dec 2022 15:47:41 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=B7=BB=E5=8A=A0=E4=BA=86deta?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config.py b/src/config.py index 46ab4ee..79dc0ed 100644 --- a/src/config.py +++ b/src/config.py @@ -12,6 +12,8 @@ class Config: Available database: sqlite3, mysql sqlite3 -> sqlite3 (default) mysql -> user:pwd@host:port/db + deta -> deta """ - database = os.getenv('COUNTER_DB') or "root:123@gd.dgtmc.top:3306/" # Database type - DETA = False if not os.getenv('DETA_RUNTIME') else True # mark deta + database = os.getenv('COUNTER_DB') or "sqlite3" # 数据库类型 + if os.getenv("PJ_DETA") is not None: + database = "deta" # 自动设置为deta