Fixed AP timeout on linux due to zombie AP process (#5550)

* Fixed AP timeout on linux due to zombie AP process

* Fixed reversed check

Co-authored-by: aljanru <aljanru@uc5564ff5a5ee55.ant.amazon.com>
This commit is contained in:
AMZN-AlexOteiza
2021-11-11 22:36:26 +00:00
committed by GitHub
parent eafb2fdce5
commit f861ab622e
@@ -416,13 +416,8 @@ class AssetProcessor(object):
self.restore_ap_settings()
def process_exists(self):
try:
my_pid = self.get_pid()
if my_pid == -1:
return False
return psutil.pid_exists(my_pid)
except psutil.NoSuchProcess:
pass
if self._ap_proc:
return self._ap_proc.poll() is None
return False
def batch_process(self, timeout=DEFAULT_TIMEOUT_SECONDS, fastscan=True, capture_output=False, platforms=None,