From f34305c0a1b7ee2da696933521963376e4ed7403 Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Fri, 15 May 2026 14:21:13 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20increase=20dsi-discovery=20timeout=2090s?= =?UTF-8?q?=E2=86=92300s,=20reduce=20max=5Fdocuments=2010=E2=86=925?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compliance/api/agent_compliance_check_routes.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 ""