From f23cab861a067458ce7569ad9654953b1f0fdf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=AE=E5=8F=AE=E5=BD=93?= <604054726@qq.com> Date: Fri, 23 Feb 2024 21:39:58 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=8E=B7=E5=8F=96=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E5=BE=85=E6=89=A7=E8=A1=8C=E4=BB=BB=E5=8A=A1>status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scheduler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scheduler.py b/app/scheduler.py index 8dce1816..d279b4f9 100644 --- a/app/scheduler.py +++ b/app/scheduler.py @@ -360,12 +360,14 @@ class Scheduler(metaclass=Singleton): job_id = job.id.split("|")[0] if not self._jobs.get(job_id): continue + # 任务状态 + status = "正在运行" if self._jobs[job_id].get("running") else "等待" # 下次运行时间 next_run = TimerUtils.time_difference(job.next_run_time) schedulers.append(schemas.ScheduleInfo( id=job_id, name=job.name, - status="等待", + status=status, next_run=next_run )) return schedulers