From c8c9f64db1c14b44499e44c97626daf8d275a478 Mon Sep 17 00:00:00 2001 From: Antoine Jacquin Date: Fri, 18 Sep 2026 21:12:18 +0200 Subject: [PATCH] =?UTF-8?q?Plafonner=20la=20passe=20globale=20de=20compl?= =?UTF-8?q?=C3=A9tion=20comme=20dans=20/api/preview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lidar_pipeline/webapp.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lidar_pipeline/webapp.py b/lidar_pipeline/webapp.py index 2f28bdd..a82d77f 100644 --- a/lidar_pipeline/webapp.py +++ b/lidar_pipeline/webapp.py @@ -1246,6 +1246,13 @@ def _resolve_request(req): if c not in done or req.regenerate] if not tiles: raise HTTPException(400, "aucune tuile à compléter dans input/") + # Même garde-fou que /api/preview : un run parti sur tout input/ sans + # plafond peut durer des jours sans moyen de l'interrompre proprement + if len(tiles) > MAX_CELLS_ALL: + raise HTTPException( + 400, f"trop de tuiles à compléter ({len(tiles)}) — max " + f"{MAX_CELLS_ALL} par run ; relancez la passe globale à " + f"la fin de celui-ci") else: tiles = [] for pair in req.tiles: