mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-09-21 12:43:33 +08:00
fix: don't crash if file is not found
This commit is contained in:
+8
-2
@@ -1420,8 +1420,14 @@ const clearJobs = () => {
|
||||
|
||||
for (const job of jobs) {
|
||||
// delete the directories
|
||||
rmSync(`${outputDir}${job.user_id}/${job.id}`, { recursive: true });
|
||||
rmSync(`${uploadsDir}${job.user_id}/${job.id}`, { recursive: true });
|
||||
rmSync(`${outputDir}${job.user_id}/${job.id}`, {
|
||||
recursive: true,
|
||||
force: true,
|
||||
});
|
||||
rmSync(`${uploadsDir}${job.user_id}/${job.id}`, {
|
||||
recursive: true,
|
||||
force: true,
|
||||
});
|
||||
|
||||
// delete the job
|
||||
db.query("DELETE FROM jobs WHERE id = ?").run(job.id);
|
||||
|
||||
Reference in New Issue
Block a user