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