update genshin

This commit is contained in:
hibiki
2021-06-21 09:53:33 +08:00
parent 647ead8b6d
commit 862776b011
403 changed files with 138 additions and 239 deletions
+2 -1
View File
@@ -3,6 +3,7 @@
from gino import Gino
from .log import logger
from configs.config import bind, sql_name, user, password, address, port, database
from .service_config import DATABASE_URI
# 全局数据库连接对象
@@ -10,7 +11,7 @@ db = Gino()
async def init():
i_bind = bind
i_bind = DATABASE_URI if DATABASE_URI else bind
if not bind:
i_bind = f"{sql_name}://{user}:{password}@{address}:{port}/{database}"
# print(i_bind)
+13
View File
@@ -0,0 +1,13 @@
import os
try:
DATABASE_URI = os.environ['DATABASE_URI']
except KeyError:
DATABASE_URI = ''
try:
TL_M_KEY = os.environ['TL_KEY']
except KeyError:
TL_M_KEY = []