Closed galaczi closed 1 year ago
Anyone knows how to avoid the main process exiting on error in any of the jobs? I found some old issues, people asking for it. Why would you want the whole process to exit on error in a single job, I don't get it.
I think you are missing an await
await queue.add(async () => {
try {
await handleClosed()
} catch (error) {
console.log('Error thrown in queue.')
}
})
According to the docs:
I tried this:
Still, if an error is thrown in
handleClosed
, the whole process exits. What am I missing?Edit: same result with this:
Edit 2: Maybe I am misunderstanding what the docs say. I shouldn't throw errors inside jobs at all (or should catch inside)?