Skip to content
Snippets Groups Projects
Commit 936933f0 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[backend] Fix scheduling routines for detecting KILL state

parent 5f5c0a3e
No related branches found
No related tags found
1 merge request!194Scheduler
......@@ -434,7 +434,7 @@ def work(environments, cpulimit, process, django_settings):
is started locally and the process ID stored with the split.
Job split cancelling is executed by setting the split state as
``CANCELLED`` and waiting for this function to handle it.
``KILL`` and waiting for this function to handle it.
Parameters:
......@@ -459,7 +459,7 @@ def work(environments, cpulimit, process, django_settings):
# cancel job splits
for j in JobSplit.objects.select_for_update().filter(worker=worker,
status=Job.CANCELLED, end_date__isnull=True, process_id__isnull=False):
status=Job.KILL, end_date__isnull=True, process_id__isnull=False):
signal.signal(signal.SIGKILL, j.process_id)
j.end(None, Job.CANCELLED)
......@@ -561,7 +561,7 @@ def worker_shutdown():
# cancel job splits which are running
for j in JobSplit.objects.select_for_update().filter(worker=worker,
status=(Job.CANCELLED, Job.PROCESSING), end_date__isnull=True,
status=(Job.KILL, Job.PROCESSING), end_date__isnull=True,
process_id__isnull=False):
signal.signal(signal.SIGKILL, j.process_id)
j.end(Result(status=1, usrerr=message))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment