From 8ace692ea6b0fd2c5fe5554d38cef27a7c396e2a Mon Sep 17 00:00:00 2001 From: MarkusJoe Date: Tue, 4 Oct 2022 15:41:01 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/config.py b/src/config.py index ae09425..dd6ee6a 100644 --- a/src/config.py +++ b/src/config.py @@ -5,23 +5,9 @@ # @Create Time: 2022/9/11 # @File Name: config.py -import os - class Config: """ - Available database: sqlite3, Redis. - Redis: "redis://host:port@password". - If your database doesn't have password, just don't type "@password". - Don't type ":" to use default port. + Available database: sqlite """ database = "sqlite" # Database type - if 'redis' in database: - os.environ['c_not_full'] = "True" # Not full API supported. - os.environ['c_host'] = database.split('://')[-1].split(':')[0] - if ':' not in database.split('://'): - os.environ['c_port'] = '6379' - else: - os.environ['c_port'] = database.split('://')[-1].split('@')[0].split(':')[-1] - if '@' in database: - os.environ['c_password'] = database.split('://')[-1].split(':')[-1].split('@')[-1]