From 87d64d241ce96b900636ed85fe1fc47cc8ced7c0 Mon Sep 17 00:00:00 2001 From: Franck Garnier Date: Sun, 12 Apr 2026 15:36:08 -0400 Subject: [PATCH] fix: increase default timeout to 2h for large panoramas (87+ images) cpfind on 80+ images takes ~30 min, previous 600s timeout was insufficient. Co-Authored-By: Claude Opus 4.6 (1M context) --- pipeline/panorama_pipeline.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pipeline/panorama_pipeline.py b/pipeline/panorama_pipeline.py index fb6e1bc..ce4fc47 100644 --- a/pipeline/panorama_pipeline.py +++ b/pipeline/panorama_pipeline.py @@ -76,9 +76,11 @@ def get_tile(imageid): return None -def run_hugin(tool, args, cwd=None, timeout=600): - """Run a Hugin CLI tool.""" +def run_hugin(tool, args, cwd=None, timeout=None): + """Run a Hugin CLI tool. Timeout scales with number of images if not specified.""" cmd = f"{tool} {args}" + if timeout is None: + timeout = 7200 # 2 hours default for large panoramas result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout, cwd=cwd) return result