forked from EduCraft/curriculum-project-hub
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user