fix bug
This commit is contained in:
parent
76f1de42a8
commit
a7b51d9fcc
@ -230,14 +230,15 @@ class Scheduler(metaclass=Singleton):
|
|||||||
added.append(job.name)
|
added.append(job.name)
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
if not self._jobs.get(job.id):
|
job_id = job.id.split("|")[0]
|
||||||
|
if not self._jobs.get(job_id):
|
||||||
continue
|
continue
|
||||||
# 任务状态
|
# 任务状态
|
||||||
status = "正在运行" if self._jobs[job.id].get("running") else "等待"
|
status = "正在运行" if self._jobs[job_id].get("running") else "等待"
|
||||||
# 下次运行时间
|
# 下次运行时间
|
||||||
next_run = TimerUtils.time_difference(job.next_run_time)
|
next_run = TimerUtils.time_difference(job.next_run_time)
|
||||||
schedulers.append(schemas.ScheduleInfo(
|
schedulers.append(schemas.ScheduleInfo(
|
||||||
id=job.id,
|
id=job_id,
|
||||||
name=job.name,
|
name=job.name,
|
||||||
status=status,
|
status=status,
|
||||||
next_run=next_run
|
next_run=next_run
|
||||||
|
Loading…
x
Reference in New Issue
Block a user