aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-03 09:27:30 +0200
committerChocobozzz <me@florianbigard.com>2018-08-06 11:19:16 +0200
commitd7f83948a1af0ef3bed61f83e87e826902c96f7d (patch)
treed22177bcbf22aeb054960372a6bc39bea6077692 /server/lib/job-queue/handlers
parented31c059851a30bd5ba9999f8ecb3822d576b9f4 (diff)
downloadPeerTube-d7f83948a1af0ef3bed61f83e87e826902c96f7d.tar.gz
PeerTube-d7f83948a1af0ef3bed61f83e87e826902c96f7d.tar.zst
PeerTube-d7f83948a1af0ef3bed61f83e87e826902c96f7d.zip
Correctly handle video import errors
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r--server/lib/job-queue/handlers/video-import.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/job-queue/handlers/video-import.ts b/server/lib/job-queue/handlers/video-import.ts
index 5a7722153..4f2faab7d 100644
--- a/server/lib/job-queue/handlers/video-import.ts
+++ b/server/lib/job-queue/handlers/video-import.ts
@@ -35,7 +35,7 @@ async function processVideoImport (job: Bull.Job) {
35 35
36 // Get information about this video 36 // Get information about this video
37 const { videoFileResolution } = await getVideoFileResolution(tempVideoPath) 37 const { videoFileResolution } = await getVideoFileResolution(tempVideoPath)
38 const fps = await getVideoFileFPS(tempVideoPath + 's') 38 const fps = await getVideoFileFPS(tempVideoPath)
39 const stats = await statPromise(tempVideoPath) 39 const stats = await statPromise(tempVideoPath)
40 const duration = await getDurationFromVideoFile(tempVideoPath) 40 const duration = await getDurationFromVideoFile(tempVideoPath)
41 41
@@ -115,6 +115,7 @@ async function processVideoImport (job: Bull.Job) {
115 logger.error('Cannot cleanup files after a video import error.', { err: errUnlink }) 115 logger.error('Cannot cleanup files after a video import error.', { err: errUnlink })
116 } 116 }
117 117
118 videoImport.error = err.message
118 videoImport.state = VideoImportState.FAILED 119 videoImport.state = VideoImportState.FAILED
119 await videoImport.save() 120 await videoImport.save()
120 121