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