mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[fix] f-string doesn't work like that in multilines
This commit is contained in:
parent
494f962ba0
commit
dffb1f711d
1 changed files with 4 additions and 4 deletions
8
run.py
8
run.py
|
@ -778,7 +778,7 @@ async def api_stop_job(request, job_id):
|
|||
|
||||
if job.state == "scheduled":
|
||||
api_logger.info(f"Cancel scheduled job '{job.name}' [job.id] "
|
||||
"on request")
|
||||
f"on request")
|
||||
job.state = "canceled"
|
||||
job.save()
|
||||
|
||||
|
@ -810,13 +810,13 @@ async def api_stop_job(request, job_id):
|
|||
|
||||
if job.state in ("done", "canceled", "failure", "error"):
|
||||
api_logger.info(f"Request to cancel job '{job.name}' "
|
||||
"[job.id] but job is already in '{job.state}' state, "
|
||||
"do nothing")
|
||||
f"[job.id] but job is already in '{job.state}' state, "
|
||||
f"do nothing")
|
||||
# nothing to do, task is already done
|
||||
return response.text("ok")
|
||||
|
||||
raise Exception(f"Tryed to cancel a job with an unknown state: "
|
||||
"{job.state}")
|
||||
f"{job.state}")
|
||||
|
||||
|
||||
@app.route("/api/job/<job_id:int>/restart", methods=['POST'])
|
||||
|
|
Loading…
Add table
Reference in a new issue