fix: increase dsi-discovery timeout 90s→300s, reduce max_documents 10→5

This commit is contained in:
Benjamin Admin
2026-05-15 14:21:13 +02:00
parent 2b5376ed54
commit f34305c0a1
@@ -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 ""