From 77df64bfb50446c0e8e599a38d95d8fe8f72c6c7 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Wed, 5 Mar 2025 11:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=9C=A8=E5=B8=A6=E4=BA=86=20=5F=5Fdel=5F=5F?= =?UTF-8?q?=20=E4=B9=8B=E5=90=8E=E6=97=A0=E6=B3=95=E8=A2=AB=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E5=92=8C=E9=87=8D=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/star/star_manager.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/astrbot/core/star/star_manager.py b/astrbot/core/star/star_manager.py index f7c8593a2..4c77cf0f5 100644 --- a/astrbot/core/star/star_manager.py +++ b/astrbot/core/star/star_manager.py @@ -1,3 +1,7 @@ +""" +插件的重载、启停、安装、卸载等操作。 +""" + import inspect import functools import os @@ -527,7 +531,9 @@ class PluginManager: logging.info(f"正在终止插件 {star_metadata.name} ...") if hasattr(star_metadata.star_cls, "__del__"): - asyncio.get_event_loop().run_in_executor(star_metadata.star_cls.__del__) + asyncio.get_event_loop().run_in_executor( + None, star_metadata.star_cls.__del__ + ) else: await star_metadata.star_cls.terminate()