From 22647d8b1f11c783af6e5168e727e7396acb14ff Mon Sep 17 00:00:00 2001 From: azhengzz <820108271@qq.com> Date: Fri, 19 Mar 2021 17:28:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ApiAutomationTest/app/cores/dispatcher_scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ApiAutomationTest/app/cores/dispatcher_scheduler.py b/ApiAutomationTest/app/cores/dispatcher_scheduler.py index e9695c2..3accc05 100644 --- a/ApiAutomationTest/app/cores/dispatcher_scheduler.py +++ b/ApiAutomationTest/app/cores/dispatcher_scheduler.py @@ -7,11 +7,11 @@ from apscheduler.triggers.cron import CronTrigger class DispatcherScheduler(BackgroundScheduler): # 调度计划定时任务 def __init__(self, app=None): + super().__init__() if app is not None: self.init_app(app=app) def init_app(self, app: Flask): - super().__init__() super().start() # 每次在拉起Flask服务后,第一个请求处理前执行 app.before_first_request(self.run_all_scheduler)