Update log messages and add error output in file process queue

This commit is contained in:
srgooglo 2025-06-30 20:37:12 +02:00
parent 218df1c284
commit 79fbb74f32

View File

@ -6,7 +6,7 @@ export default {
id: "file-process", id: "file-process",
maxJobs: 2, maxJobs: 2,
process: async (job) => { process: async (job) => {
console.log("[JOB][file-process] starting... >", job.data) console.log("[JOB][file-process] running... >", job.data)
try { try {
const result = await Upload.fileHandle({ const result = await Upload.fileHandle({
@ -22,6 +22,8 @@ export default {
.rm(job.workPath, { recursive: true, force: true }) .rm(job.workPath, { recursive: true, force: true })
.catch(() => null) .catch(() => null)
console.error(error)
throw new Error( throw new Error(
`Failed to process file > ${error.message ?? error}`, `Failed to process file > ${error.message ?? error}`,
) )