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) <noreply@anthropic.com>
This commit is contained in:
Franck Garnier
2026-04-12 15:36:08 -04:00
parent 806d2be732
commit 87d64d241c

View File

@@ -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