aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r--server/lib/job-queue/handlers/utils/activitypub-http-utils.ts2
-rw-r--r--server/lib/job-queue/handlers/video-file.ts6
2 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts b/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts
index c087371c6..36092665e 100644
--- a/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts
+++ b/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts
@@ -15,7 +15,7 @@ async function computeBody (payload: { body: any, signatureActorId?: number }) {
15} 15}
16 16
17async function buildSignedRequestOptions (payload: { signatureActorId?: number }) { 17async function buildSignedRequestOptions (payload: { signatureActorId?: number }) {
18 let actor: ActorModel 18 let actor: ActorModel | null
19 if (payload.signatureActorId) { 19 if (payload.signatureActorId) {
20 actor = await ActorModel.load(payload.signatureActorId) 20 actor = await ActorModel.load(payload.signatureActorId)
21 if (!actor) throw new Error('Unknown signature actor id.') 21 if (!actor) throw new Error('Unknown signature actor id.')
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 {