fix(tcadp): add timeout to HTTP GET request for document download (#18336)

This commit is contained in:
Ricardo-M-L
2026-08-17 13:22:21 +08:00
committed by GitHub
parent b5512b8014
commit 7ef144279b

View File

@@ -178,7 +178,7 @@ class TencentCloudAPIClient:
filename = f"tcadp_result_{timestamp}.zip"
file_path = os.path.join(output_dir, filename)
with requests.get(download_url, stream=True) as response:
with requests.get(download_url, stream=True, timeout=300) as response:
response.raise_for_status()
with open(file_path, "wb") as f:
response.raw.decode_content = True