Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Sep 24, 2023
1 parent 76f1de4 commit a7b51d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,15 @@ def list(self) -> List[schemas.ScheduleInfo]:
added.append(job.name)
else:
continue
if not self._jobs.get(job.id):
job_id = job.id.split("|")[0]
if not self._jobs.get(job_id):
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)
schedulers.append(schemas.ScheduleInfo(
id=job.id,
id=job_id,
name=job.name,
status=status,
next_run=next_run
Expand Down

0 comments on commit a7b51d9

Please sign in to comment.