diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-03 09:27:30 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-06 11:19:16 +0200 |
commit | d7f83948a1af0ef3bed61f83e87e826902c96f7d (patch) | |
tree | d22177bcbf22aeb054960372a6bc39bea6077692 /server/lib/job-queue/job-queue.ts | |
parent | ed31c059851a30bd5ba9999f8ecb3822d576b9f4 (diff) | |
download | PeerTube-d7f83948a1af0ef3bed61f83e87e826902c96f7d.tar.gz PeerTube-d7f83948a1af0ef3bed61f83e87e826902c96f7d.tar.zst PeerTube-d7f83948a1af0ef3bed61f83e87e826902c96f7d.zip |
Correctly handle video import errors
Diffstat (limited to 'server/lib/job-queue/job-queue.ts')
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index 2e14867f2..ffd948b5f 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts | |||
@@ -79,7 +79,10 @@ class JobQueue { | |||
79 | const handler = handlers[handlerName] | 79 | const handler = handlers[handlerName] |
80 | 80 | ||
81 | queue.process(JOB_CONCURRENCY[handlerName], handler) | 81 | queue.process(JOB_CONCURRENCY[handlerName], handler) |
82 | .catch(err => logger.error('Cannot execute job queue %s.', handlerName, { err })) | 82 | |
83 | queue.on('failed', (job, err) => { | ||
84 | logger.error('Cannot execute job %d in queue %s.', job.id, handlerName, { payload: job.data, err }) | ||
85 | }) | ||
83 | 86 | ||
84 | queue.on('error', err => { | 87 | queue.on('error', err => { |
85 | logger.error('Error in job queue %s.', handlerName, { err }) | 88 | logger.error('Error in job queue %s.', handlerName, { err }) |