perf(video-studio): Enable parallel uploads for bulk photo processing in video studio

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Claude Code 2026-04-03 07:29:10 -07:00
parent cf4e55e89d
commit 044cc918e0

View file

@ -72,6 +72,8 @@ def upload_photo(local_id: str, auth_token: str, device_id: str, base_url: str)
encoded_id = urllib.parse.quote(local_id, safe="")
url = f"{base_url}/api/sync/photos/{encoded_id}/upload"
file_size_kb = file_path.stat().st_size // 1024
# Scale timeout with file size: 120s base + 60s per 100MB
timeout = max(120, 120 + (file_size_kb // 1024) * 6)
result = subprocess.run(
[
@ -82,7 +84,7 @@ def upload_photo(local_id: str, auth_token: str, device_id: str, base_url: str)
url,
],
capture_output=True, text=True,
timeout=120,
timeout=timeout,
)
if result.returncode != 0: