mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-08 21:30:01 +08:00
refactor code
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
from gino import Gino
|
||||
from .log import logger
|
||||
from configs.config import bind, sql_name, user, password, address, port, database
|
||||
@@ -14,7 +13,6 @@ async def init():
|
||||
i_bind = DATABASE_URI if DATABASE_URI else bind
|
||||
if not i_bind:
|
||||
i_bind = f"{sql_name}://{user}:{password}@{address}:{port}/{database}"
|
||||
# print(i_bind)
|
||||
try:
|
||||
await db.set_bind(i_bind)
|
||||
await db.gino.create_all()
|
||||
|
||||
@@ -4,7 +4,7 @@ DATABASE_URI = os.environ.get('DATABASE_URI')
|
||||
|
||||
TL_M_KEY = os.environ.get('TL_KEY')
|
||||
|
||||
SYSTEM_PROXY = os.environ.get('SYSTEM_PROXY')
|
||||
SYSTEM_M_PROXY = os.environ.get('SYSTEM_PROXY')
|
||||
|
||||
ALAPI_M_TOKEN = os.environ.get('ALAPI_TOKEN')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user