添加生产环境配置

This commit is contained in:
wuhao 2020-09-14 17:16:45 +08:00
parent ea00da31cc
commit ea74f7e678

View File

@ -5,7 +5,7 @@ from loguru import logger
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) BASE_DIR = os.path.dirname(os.path.abspath(__file__))
logger.add(os.path.join(BASE_DIR, 'log.log'), format="{time} {level} {name}:{line} {message}", level="INFO", logger.add(os.path.join(BASE_DIR, 'log.log'), format="{time} {level} {name}:{line} {message}", level="INFO",
rotation="50 MB", retention='7 days', rotation="100 MB", retention='7 days',
enqueue=True) enqueue=True)
@ -327,5 +327,14 @@ class DevConfig(Config):
}, },
} }
class ProductionConfig(Config):
GAME_MANA_MYSQLDB = {
"host": "127.0.0.1",
"port": 3306,
"user": "root",
"password": "iamciniao",
"db": "gamemana"
}
settings = Config()
settings = ProductionConfig()