Spaces:
Running
Running
fix: increase base timeout from 30s to 60s for PDF generation
Browse filesPrevents false timeout errors on text-only exports with external
resource references (fonts, CDN, etc.)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
server.js
CHANGED
|
@@ -75,7 +75,7 @@ app.post('/api/generate_pdf', async (req, res) => {
|
|
| 75 |
const totalWaitTime = Math.min(baseWaitTime + sizeWaitTime, 8000);
|
| 76 |
|
| 77 |
// 动态计算 waitForNetworkIdle 超时上限
|
| 78 |
-
const baseTimeout =
|
| 79 |
let extraMs = 0;
|
| 80 |
if (imgCount <= 30) {
|
| 81 |
extraMs = imgCount * 3000;
|
|
|
|
| 75 |
const totalWaitTime = Math.min(baseWaitTime + sizeWaitTime, 8000);
|
| 76 |
|
| 77 |
// 动态计算 waitForNetworkIdle 超时上限
|
| 78 |
+
const baseTimeout = 60000;
|
| 79 |
let extraMs = 0;
|
| 80 |
if (imgCount <= 30) {
|
| 81 |
extraMs = imgCount * 3000;
|