aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/video-file.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-07-25 22:01:25 +0200
committerRigel Kent <sendmemail@rigelk.eu>2018-07-25 22:01:25 +0200
commitc1e791bad0b079af67398f6407221e6dcbb573dd (patch)
tree82e5944b4458dd35aa482a38f6b650eb93bb89ad /server/lib/job-queue/handlers/video-file.ts
parent5f7021c33d31c5255b995ae0ff86b5bbea4ea4b9 (diff)
downloadPeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.tar.gz
PeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.tar.zst
PeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.zip
expliciting type checks and predicates (server only)
Diffstat (limited to 'server/lib/job-queue/handlers/video-file.ts')
-rw-r--r--server/lib/job-queue/handlers/video-file.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/job-queue/handlers/video-file.ts b/server/lib/job-queue/handlers/video-file.ts
index bd68dd78b..6b1a8f132 100644
--- a/server/lib/job-queue/handlers/video-file.ts
+++ b/server/lib/job-queue/handlers/video-file.ts
@@ -28,7 +28,7 @@ async function processVideoFileImport (job: Bull.Job) {
28 const video = await VideoModel.loadByUUIDAndPopulateAccountAndServerAndTags(payload.videoUUID) 28 const video = await VideoModel.loadByUUIDAndPopulateAccountAndServerAndTags(payload.videoUUID)
29 // No video, maybe deleted? 29 // No video, maybe deleted?
30 if (!video) { 30 if (!video) {
31 logger.info('Do not process job %d, video does not exist.', job.id, { videoUUID: video.uuid }) 31 logger.info('Do not process job %d, video does not exist.', job.id)
32 return undefined 32 return undefined
33 } 33 }
34 34
@@ -45,13 +45,13 @@ async function processVideoFile (job: Bull.Job) {
45 const video = await VideoModel.loadByUUIDAndPopulateAccountAndServerAndTags(payload.videoUUID) 45 const video = await VideoModel.loadByUUIDAndPopulateAccountAndServerAndTags(payload.videoUUID)
46 // No video, maybe deleted? 46 // No video, maybe deleted?
47 if (!video) { 47 if (!video) {
48 logger.info('Do not process job %d, video does not exist.', job.id, { videoUUID: video.uuid }) 48 logger.info('Do not process job %d, video does not exist.', job.id)
49 return undefined 49 return undefined
50 } 50 }
51 51
52 // Transcoding in other resolution 52 // Transcoding in other resolution
53 if (payload.resolution) { 53 if (payload.resolution) {
54 await video.transcodeOriginalVideofile(payload.resolution, payload.isPortraitMode) 54 await video.transcodeOriginalVideofile(payload.resolution, payload.isPortraitMode || false)
55 55
56 await retryTransactionWrapper(onVideoFileTranscoderOrImportSuccess, video) 56 await retryTransactionWrapper(onVideoFileTranscoderOrImportSuccess, video)
57 } else { 57 } else {