feat: 集成新版本插件运行时,支持事件桥接与命令处理
This commit is contained in:
4
bot.py
4
bot.py
@@ -201,6 +201,10 @@ async def graceful_shutdown(): # sourcery skip: use-named-expression
|
||||
# 触发 ON_STOP 事件
|
||||
await events_manager.handle_mai_events(event_type=EventType.ON_STOP)
|
||||
|
||||
# 停止新版本插件运行时
|
||||
from src.plugin_runtime.integration import get_plugin_runtime_manager
|
||||
await get_plugin_runtime_manager().stop()
|
||||
|
||||
# 停止所有异步任务
|
||||
await async_task_manager.stop_and_wait_all_tasks()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user