From c7cbb130442e44ded114d7cb77e597cb7c30e297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=AF=E5=A4=A7=E4=BE=A0?= Date: Sun, 8 Jun 2025 11:30:33 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=8F=92=E4=BB=B6=E5=8D=B8=E8=BD=BD?= =?UTF-8?q?=E5=90=8E=E4=BB=8E=E7=B3=BB=E7=BB=9F=E6=A8=A1=E5=9D=97=E4=B8=AD?= =?UTF-8?q?=E7=A7=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免分身时误报插件已存在 --- app/core/plugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/core/plugin.py b/app/core/plugin.py index aeb78e24..5455c0ca 100644 --- a/app/core/plugin.py +++ b/app/core/plugin.py @@ -307,6 +307,10 @@ class PluginManager(metaclass=Singleton): """ self.stop(plugin_id) + from sys import modules + + del modules[f"app.plugins.{plugin_id.lower()}"] + def reload_plugin(self, plugin_id: str): """ 将一个插件重新加载到内存