From d5268df18af5a8aa62fb0e4f20cdf466c8a09e4c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 7 Feb 2023 12:54:26 +0100 Subject: [PATCH] Fixes from the battlefield --- run.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/run.py b/run.py index 7c71726..b2ee518 100644 --- a/run.py +++ b/run.py @@ -568,6 +568,10 @@ async def cleanup_old_package_check_if_lock_exists(worker, job, ignore_error=Fal ["jobs", f"job-{job.id}", f"app-jobs-{job.url_or_path}"], ) + # Dirty hack to kill ~zombi processes adopted by init doing funky stuff -_- + os.system("for PID in $(ps -ef --forest | grep 'lxc exec' | grep ' 1 ' | awk '{print $2}'); do kill -9 $PID; done") + os.system("for PID in $(ps -ef --forest | grep 'script -qefc' | grep ' 1 ' | awk '{print $2}' ); do kill $PID; done") + async def run_job(worker, job): @@ -715,7 +719,7 @@ async def run_job(worker, job): + f"/results/logs/list_level_{app.config.YNH_BRANCH}_{app.config.ARCH}.json" ) if ( - os.path.exists(public_result_json_path) + not os.path.exists(public_result_json_path) or not open(public_result_json_path).read().strip() ): public_result = {}