From ffb5823e845134eb3ada6f2cdbf1cd56c4cf650f Mon Sep 17 00:00:00 2001 From: jxxghp Date: Mon, 25 Aug 2025 08:14:43 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#4829=20=E4=BC=98=E5=8C=96=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=AF=BC=E5=85=A5=E9=80=BB=E8=BE=91=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9=20Async=20=E7=B1=BB=E7=9A=84=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/event.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/core/event.py b/app/core/event.py index 68265496..37d9e8df 100644 --- a/app/core/event.py +++ b/app/core/event.py @@ -609,7 +609,11 @@ class EventManager(metaclass=Singleton): module_name = f"app.chain.{class_name[:-5].lower()}" module = importlib.import_module(module_name) elif class_name.endswith("Helper"): - module_name = f"app.helper.{class_name[:-6].lower()}" + # 特殊处理 Async 类 + if class_name.startswith("Async"): + module_name = f"app.helper.{class_name[5:-6].lower()}" + else: + module_name = f"app.helper.{class_name[:-6].lower()}" module = importlib.import_module(module_name) else: module_name = f"app.{class_name.lower()}"