fix(hub): raise Docmind OSS upload timeout past httpx 3s default

SubmitDocParserJobAdvance uploads PDFs to Aliyun OSS via tea/httpx, which
defaults readTimeout to 3000ms when RuntimeOptions is empty. Multi-MB
teacher PDFs on para silo failed with ReadTimeout(3000) before the job
could start. Set connectTimeout=15s and readTimeout=5m.
This commit is contained in:
2026-07-30 11:16:56 +08:00
parent 3367d3340b
commit 97a99cd381
3 changed files with 40 additions and 3 deletions
+5 -1
View File
@@ -26,7 +26,11 @@ const client = new DocmindClient.default({
} as never);
const fileStream = createReadStream(pdfPath);
const runtime = new RuntimeOptions({});
const runtime = new RuntimeOptions({
connectTimeout: 15_000,
// httpx defaults to 3000ms; OSS upload of multi-MB PDFs needs far more.
readTimeout: 5 * 60_000,
});
console.log("Submitting job...");
const submitResp = await client.submitDocParserJobAdvance(