From 2a1b292ed94271129bf31128830621e0ddfc445b Mon Sep 17 00:00:00 2001 From: SXP-Simon Date: Thu, 12 Mar 2026 18:47:16 +0800 Subject: [PATCH] fix(ruff) --- src/infrastructure/scheduler/auto_scheduler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/scheduler/auto_scheduler.py b/src/infrastructure/scheduler/auto_scheduler.py index 83d7197..ce33646 100644 --- a/src/infrastructure/scheduler/auto_scheduler.py +++ b/src/infrastructure/scheduler/auto_scheduler.py @@ -269,7 +269,11 @@ class AutoScheduler: def unschedule_jobs(self, context): """取消定时任务""" - if not context or not hasattr(context, "cron_manager") or not context.cron_manager: + if ( + not context + or not hasattr(context, "cron_manager") + or not context.cron_manager + ): return scheduler = context.cron_manager.scheduler