From a814c09232c74ca4b7ecdd01650aa2e00865aab3 Mon Sep 17 00:00:00 2001 From: Dongmay <89748169+Dongmayyys@users.noreply.github.com> Date: Thu, 26 Mar 2026 00:59:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(scheduler):=20schedule=5Fjobs=20=E5=90=8E?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=20=5Fterminating=20=E6=A0=87=E5=BF=97?= =?UTF-8?q?=E4=BD=8D=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=88=86=E6=9E=90=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E9=9D=99=E9=BB=98=E8=B7=B3=E8=BF=87=20(#130=20@Dongma?= =?UTF-8?q?yyys)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/infrastructure/scheduler/auto_scheduler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/infrastructure/scheduler/auto_scheduler.py b/src/infrastructure/scheduler/auto_scheduler.py index b03f1ba..aca016d 100644 --- a/src/infrastructure/scheduler/auto_scheduler.py +++ b/src/infrastructure/scheduler/auto_scheduler.py @@ -149,6 +149,10 @@ class AutoScheduler: # 先清理旧任务 self.unschedule_jobs(context) + # unschedule_jobs 会将 _terminating 置为 True(用于关闭场景), + # 但 schedule_jobs 表示插件仍在运行,需要重置终止标志位 + self._terminating = False + if not self.config_manager.get_enable_auto_analysis(): logger.info("自动分析功能未启用,不注册定时任务") return