fix scheduler list
This commit is contained in:
parent
5e47baa4c8
commit
df275c16ba
@ -90,11 +90,15 @@ def schedule(_: schemas.TokenPayload = Depends(verify_token)) -> Any:
|
|||||||
continue
|
continue
|
||||||
if not StringUtils.is_chinese(job.name):
|
if not StringUtils.is_chinese(job.name):
|
||||||
continue
|
continue
|
||||||
next_run = TimerUtils.time_difference(job.next_run_time)
|
if not job.next_run_time:
|
||||||
if not next_run:
|
|
||||||
status = "已停止"
|
status = "已停止"
|
||||||
|
next_run = ""
|
||||||
else:
|
else:
|
||||||
status = "等待" if job.pending else "运行中"
|
next_run = TimerUtils.time_difference(job.next_run_time)
|
||||||
|
if not next_run:
|
||||||
|
status = "正在运行"
|
||||||
|
else:
|
||||||
|
status = "阻塞" if job.pending else "等待"
|
||||||
schedulers.append(schemas.ScheduleInfo(
|
schedulers.append(schemas.ScheduleInfo(
|
||||||
id=job.id,
|
id=job.id,
|
||||||
name=job.name,
|
name=job.name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user