Send SIGTERM when cancelling jobs ?

This commit is contained in:
Alexandre Aubin 2020-12-28 23:42:19 +01:00 committed by GitHub
parent c903c5c0a7
commit e3aabd4515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

1
run.py
View file

@ -440,6 +440,7 @@ async def run_job(worker, job):
}, ["jobs", f"job-{job.id}", f"app-jobs-{job.url_or_path}"])
except CancelledError:
command.terminate()
job.log += "\n"
job.end_time = datetime.now()
job.state = "canceled"