mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-29 00:32:06 +08:00
update 0.0.6.0
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
from .db_context import *
|
||||
from .log import *
|
||||
from .service_config import *
|
||||
@@ -2,7 +2,6 @@
|
||||
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 +9,7 @@ db = Gino()
|
||||
|
||||
|
||||
async def init():
|
||||
i_bind = DATABASE_URI if DATABASE_URI else bind
|
||||
i_bind = bind
|
||||
if not i_bind:
|
||||
i_bind = f"{sql_name}://{user}:{password}@{address}:{port}/{database}"
|
||||
try:
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import os
|
||||
|
||||
DATABASE_URI = os.environ.get('DATABASE_URI')
|
||||
|
||||
TL_M_KEY = os.environ.get('TL_KEY')
|
||||
|
||||
SYSTEM_M_PROXY = os.environ.get('SYSTEM_PROXY')
|
||||
|
||||
ALAPI_M_TOKEN = os.environ.get('ALAPI_TOKEN')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user