1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Correctly handle video import errors

This commit is contained in:
Chocobozzz 2018-08-03 09:27:30 +02:00
parent ed31c05985
commit d7f83948a1
7 changed files with 38 additions and 7 deletions

View file

@ -79,7 +79,10 @@ class JobQueue {
const handler = handlers[handlerName]
queue.process(JOB_CONCURRENCY[handlerName], handler)
.catch(err => logger.error('Cannot execute job queue %s.', handlerName, { err }))
queue.on('failed', (job, err) => {
logger.error('Cannot execute job %d in queue %s.', job.id, handlerName, { payload: job.data, err })
})
queue.on('error', err => {
logger.error('Error in job queue %s.', handlerName, { err })