mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-09 23:36:02 +00:00
refactor: yirimirai 适配器实现异步
This commit is contained in:
@@ -7,6 +7,7 @@ from ..openai import manager as openai_mgr
|
||||
from ..config import manager as config_mgr
|
||||
from ..database import manager as database_mgr
|
||||
from ..utils.center import v2 as center_mgr
|
||||
from ..plugin import host as plugin_host
|
||||
|
||||
|
||||
class Application:
|
||||
@@ -28,4 +29,7 @@ class Application:
|
||||
pass
|
||||
|
||||
async def run(self):
|
||||
pass
|
||||
# TODO make it async
|
||||
plugin_host.initialize_plugins()
|
||||
|
||||
await self.im_mgr.run()
|
||||
@@ -44,4 +44,11 @@ async def init_logging() -> logging.Logger:
|
||||
)
|
||||
qcg_logger.addHandler(handler)
|
||||
|
||||
logging.basicConfig(level=level, # 设置日志输出格式
|
||||
format="[DEPR][%(asctime)s.%(msecs)03d] %(pathname)s (%(lineno)d) - [%(levelname)s] :\n%(message)s",
|
||||
# 日志输出的格式
|
||||
# -8表示占位符,让输出左对齐,输出长度都为8位
|
||||
datefmt="%Y-%m-%d %H:%M:%S" # 时间输出的格式
|
||||
)
|
||||
|
||||
return qcg_logger
|
||||
Reference in New Issue
Block a user