获取调度器任务的接口
All checks were successful
ci/woodpecker/push/check_format Pipeline was successful

This commit is contained in:
zhbaor 2025-01-03 23:56:25 +08:00
parent dbbea033b8
commit ddb938c343

View file

@ -561,6 +561,21 @@ def get_idle_status():
return str(config.idle)
@app.route("/scheduler")
def get_scheduler_tasks():
from mower.utils.scheduler import scheduler
now = datetime.now()
return [
{
"name": i._solver_name,
"priority": i.priority,
"time": i._next_execution(now).isoformat(),
}
for i in scheduler.time_queue
]
@app.route("/task", methods=["GET", "POST"])
@post_require_token
def get_count():