Updates the httpx timeout to be 30s for all operations

This commit is contained in:
Trenton H
2023-06-19 08:21:10 -07:00
parent 05188aed6d
commit 74fe7c586b
2 changed files with 10 additions and 7 deletions

View File

@@ -96,7 +96,13 @@ class TikaDocumentParser(DocumentParser):
data["pdfFormat"] = "PDF/A-3b"
try:
response = httpx.post(url, files=files, headers=headers, data=data)
response = httpx.post(
url,
files=files,
headers=headers,
data=data,
timeout=30.0,
)
response.raise_for_status() # ensure we notice bad responses
except Exception as err:
raise ParseError(