Fix Iris parser httpx read timeout for file uploads (#524)

The httpx.AsyncClient was created without a timeout parameter,
defaulting to 5 seconds for reads. This is too short for uploading
PDFs to presigned URLs and waiting for Iris API responses. Set
explicit timeouts: 30s default, 120s for reads.
This commit is contained in:
Chris Bartholomew 2026-03-09 06:22:44 -04:00 committed by GitHub
parent f88b50a45e
commit fa3501d448
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,7 @@ class IrisParser(FileParser):
""" """
content_type = mimetypes.guess_type(filename)[0] or "application/octet-stream" content_type = mimetypes.guess_type(filename)[0] or "application/octet-stream"
async with httpx.AsyncClient() as client: async with httpx.AsyncClient(timeout=httpx.Timeout(30.0, read=120.0)) as client:
# Step 1: Request a presigned upload URL # Step 1: Request a presigned upload URL
init_resp = await client.post( init_resp = await client.post(
f"{_IRIS_BASE_URL}/org/{self._org_id}/files", f"{_IRIS_BASE_URL}/org/{self._org_id}/files",