[mod] when canceling a job, set its end time

This commit is contained in:
Laurent Peuch 2018-11-03 04:57:15 +01:00
parent e4fc3c08dc
commit a55bf386eb

1
run.py
View file

@ -542,6 +542,7 @@ async def api_stop_job(request, job_id):
if job.state == "running":
api_logger.info(f"Cancel running job '{job.name}' [job.id] on request")
job.state = "canceled"
job.end_time = datetime.now()
job.save()
jobs_in_memory_state[job.id]["task"].cancel()