mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-03 02:30:01 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@ db = Gino()
|
||||
|
||||
async def init():
|
||||
i_bind = DATABASE_URI if DATABASE_URI else bind
|
||||
if not bind:
|
||||
if not i_bind:
|
||||
i_bind = f"{sql_name}://{user}:{password}@{address}:{port}/{database}"
|
||||
# print(i_bind)
|
||||
try:
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from configs.path_config import LOG_PATH
|
||||
|
||||
import sys
|
||||
# CRITICAL 50
|
||||
# ERROR 40
|
||||
# WARNING 30
|
||||
@@ -17,8 +17,8 @@ logger = logging.getLogger('hibiki')
|
||||
logger.setLevel(level=logging.DEBUG)
|
||||
|
||||
formatter = logging.Formatter('[%(asctime)s] - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s')
|
||||
# print(LOG_PATH)
|
||||
file_handler = logging.FileHandler(LOG_PATH + str((datetime.now()).date()) + '.log', mode='a', encoding='utf-8')
|
||||
|
||||
file_handler = logging.FileHandler(LOG_PATH + str(datetime.now().date()) + '.log', mode='a', encoding='utf-8')
|
||||
file_handler.setLevel(level=logging.INFO)
|
||||
file_handler.setFormatter(formatter)
|
||||
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import os
|
||||
|
||||
DATABASE_URI = os.environ.get('DATABASE_URI')
|
||||
|
||||
try:
|
||||
DATABASE_URI = os.environ['DATABASE_URI']
|
||||
except KeyError:
|
||||
DATABASE_URI = ''
|
||||
TL_M_KEY = os.environ.get('TL_KEY')
|
||||
|
||||
SYSTEM_PROXY = os.environ.get('SYSTEM_PROXY')
|
||||
|
||||
try:
|
||||
TL_M_KEY = os.environ['TL_KEY']
|
||||
except KeyError:
|
||||
TL_M_KEY = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user