diff --git a/core/config.py b/core/config.py index bdb32e6..160a815 100644 --- a/core/config.py +++ b/core/config.py @@ -1,3 +1,4 @@ +import sys from typing import Any, Dict, List, Optional, Union from pydantic import AnyHttpUrl, BaseSettings, EmailStr, HttpUrl, validator @@ -30,9 +31,11 @@ class Settings(BaseSettings): SECRET_KEY: str = 'ZaFX6EypK6PtuhGv11q4DLRvAb0csiLx4dbKUwLwCe8' REDIS_CONF = { - 'address': ('192.168.0.161', 6379), + 'host': '139.159.159.3', + 'port': 6378, 'password': 'd1Gh*zp5', - 'db': 1, # 存表结构 + 'db': 1, + 'decode_responses': 'utf-8', } CK_CONFIG = {'host': '119.29.176.224', @@ -250,4 +253,15 @@ class Debug(Settings): } +class Produce(Settings): + MDB_HOST: str = '119.29.176.224' + MDB_PORT: int = 27017 + MDB_USER: str = 'root' + MDB_PASSWORD: str = 'iamciniao' + MDB_DB: str = 'xdata' + + settings = Debug() + +if sys.platform != 'win32': + settings = Produce()