From bef8e916d2ad9de8634ca7fda7d4dfaa1cdf7e6d Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 14 Nov 2025 11:18:20 -0500 Subject: [PATCH] fix: worker fixture (#2527) --- sdks/python/tests/worker_fixture.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sdks/python/tests/worker_fixture.py b/sdks/python/tests/worker_fixture.py index 744de2593..3d921759a 100644 --- a/sdks/python/tests/worker_fixture.py +++ b/sdks/python/tests/worker_fixture.py @@ -67,12 +67,21 @@ def hatchet_worker( children = parent.children(recursive=True) for child in children: - child.terminate() + try: + child.terminate() + except psutil.NoSuchProcess: + pass - parent.terminate() + try: + parent.terminate() + except psutil.NoSuchProcess: + pass _, alive = psutil.wait_procs([parent] + children, timeout=5) for p in alive: logging.warning(f"Force killing process {p.pid}") - p.kill() + try: + p.kill() + except psutil.NoSuchProcess: + pass