From 340743abe056683ea6211a8c92b6c55c6aa785bb Mon Sep 17 00:00:00 2001 From: Antoine Jacquin Date: Fri, 18 Sep 2026 21:12:51 +0200 Subject: [PATCH] Poser le processus du job avant son fil de veille (double lancement possible) --- lidar_pipeline/webapp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lidar_pipeline/webapp.py b/lidar_pipeline/webapp.py index a82d77f..c25ee5e 100644 --- a/lidar_pipeline/webapp.py +++ b/lidar_pipeline/webapp.py @@ -1299,6 +1299,10 @@ def _launch_job(tiles, viz, req, qid=None): cwd="/app" if Path("/app").exists() else None, env=dict(os.environ, LIDAR_RUN_ID=run_id), start_new_session=True) + # proc posé AVANT le fil de veille : un run qui meurt instantanément + # déclencherait _watch → _start_next_queued avec _job["proc"] encore à + # None (serveur « libre ») et un second run partirait en parallèle. + _job["proc"] = p def _watch(): rc = p.wait() @@ -1311,7 +1315,6 @@ def _launch_job(tiles, viz, req, qid=None): _start_next_queued() threading.Thread(target=_watch, daemon=True).start() - _job["proc"] = p return cmd