diff --git a/backend-compliance/compliance/api/agent_compliance_check_routes.py b/backend-compliance/compliance/api/agent_compliance_check_routes.py index 18be3336..b883cd03 100644 --- a/backend-compliance/compliance/api/agent_compliance_check_routes.py +++ b/backend-compliance/compliance/api/agent_compliance_check_routes.py @@ -69,10 +69,11 @@ async def extract_text(req: ExtractTextRequest): Merges all documents found on the page (sub-pages, accordions, etc.) """ try: - async with httpx.AsyncClient(timeout=90.0) as client: + async with httpx.AsyncClient(timeout=300.0) as client: resp = await client.post( f"{CONSENT_TESTER_URL}/dsi-discovery", - json={"url": req.url, "max_documents": 10}, + json={"url": req.url, "max_documents": 5}, + timeout=300.0, ) if resp.status_code != 200: return { @@ -385,10 +386,11 @@ async def _fetch_text(url: str) -> str: that split DSI across multiple sub-pages/accordions). """ try: - async with httpx.AsyncClient(timeout=90.0) as client: + async with httpx.AsyncClient(timeout=300.0) as client: resp = await client.post( f"{CONSENT_TESTER_URL}/dsi-discovery", - json={"url": url, "max_documents": 10}, + json={"url": url, "max_documents": 5}, + timeout=300.0, ) if resp.status_code != 200: return ""