From 401747a7a3940f80dd1aeee36bd50ef4d95e0a8a Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sat, 14 Dec 2024 23:24:18 +0800 Subject: [PATCH] perf: hint --- astrbot/core/core_lifecycle.py | 1 + .../platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/astrbot/core/core_lifecycle.py b/astrbot/core/core_lifecycle.py index 246fb0fea..cc5d57a9e 100644 --- a/astrbot/core/core_lifecycle.py +++ b/astrbot/core/core_lifecycle.py @@ -74,6 +74,7 @@ class AstrBotCoreLifecycle: async def start(self): self._load() + logger.info("AstrBot 启动完成。") await asyncio.gather(*self.curr_tasks, return_exceptions=True) async def stop(self): diff --git a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py index d39669bcd..fa7fca81d 100644 --- a/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py +++ b/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py @@ -100,6 +100,10 @@ class AiocqhttpAdapter(Platform): abm = self.convert_message(event) if abm: await self.handle_msg(abm) + + @self.bot.on_websocket_connection + def on_websocket_connection(_): + logger.info("aiocqhttp 适配器已连接。") bot = self.bot.run_task(host=self.host, port=int(self.port), shutdown_trigger=self.shutdown_trigger_placeholder)