fix: increase dsi-discovery timeout 90s→300s, reduce max_documents 10→5
This commit is contained in:
@@ -69,10 +69,11 @@ async def extract_text(req: ExtractTextRequest):
|
|||||||
Merges all documents found on the page (sub-pages, accordions, etc.)
|
Merges all documents found on the page (sub-pages, accordions, etc.)
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
async with httpx.AsyncClient(timeout=90.0) as client:
|
async with httpx.AsyncClient(timeout=300.0) as client:
|
||||||
resp = await client.post(
|
resp = await client.post(
|
||||||
f"{CONSENT_TESTER_URL}/dsi-discovery",
|
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:
|
if resp.status_code != 200:
|
||||||
return {
|
return {
|
||||||
@@ -385,10 +386,11 @@ async def _fetch_text(url: str) -> str:
|
|||||||
that split DSI across multiple sub-pages/accordions).
|
that split DSI across multiple sub-pages/accordions).
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
async with httpx.AsyncClient(timeout=90.0) as client:
|
async with httpx.AsyncClient(timeout=300.0) as client:
|
||||||
resp = await client.post(
|
resp = await client.post(
|
||||||
f"{CONSENT_TESTER_URL}/dsi-discovery",
|
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:
|
if resp.status_code != 200:
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
Reference in New Issue
Block a user