Spaces:
Sleeping
Sleeping
Vedavyas1235 commited on
Commit ·
5e19eaa
1
Parent(s): f559b41
Revert download cleanup delay
Browse files
index.js
CHANGED
|
@@ -409,13 +409,11 @@ app.get('/api/download/:jobId', (req, res) => { // Removed requireAuth for easy
|
|
| 409 |
}
|
| 410 |
|
| 411 |
res.download(job.outputPath, 'render.mp4', () => {
|
| 412 |
-
//
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
}
|
| 418 |
-
}, 5 * 60 * 1000);
|
| 419 |
});
|
| 420 |
});
|
| 421 |
|
|
|
|
| 409 |
}
|
| 410 |
|
| 411 |
res.download(job.outputPath, 'render.mp4', () => {
|
| 412 |
+
// Cleanup after download
|
| 413 |
+
jobs.delete(job.id);
|
| 414 |
+
if (job.tempDir) {
|
| 415 |
+
try { fs.rmSync(job.tempDir, { recursive: true, force: true }); } catch (e) {}
|
| 416 |
+
}
|
|
|
|
|
|
|
| 417 |
});
|
| 418 |
});
|
| 419 |
|