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

[backend] Ignore zombie processes that are gone

parent 77c207f8
No related branches found
No related tags found
1 merge request!194Scheduler
Pipeline #
...@@ -171,8 +171,12 @@ def _cleanup_zombies(): ...@@ -171,8 +171,12 @@ def _cleanup_zombies():
'''Cleans-up eventual zombie subprocesses launched by the worker''' '''Cleans-up eventual zombie subprocesses launched by the worker'''
for child in psutil.Process().children(recursive=True): for child in psutil.Process().children(recursive=True):
if child.status() == psutil.STATUS_ZOMBIE: try:
child.wait() if child.status() == psutil.STATUS_ZOMBIE:
child.wait()
except psutil.NoSuchProcess:
# process is gone meanwhile, which is ok
pass
class WorkerManager(models.Manager): class WorkerManager(models.Manager):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment