aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r--server/lib/job-queue/handlers/activitypub-http-fetcher.ts2
-rw-r--r--server/lib/job-queue/handlers/video-file-import.ts2
-rw-r--r--server/lib/job-queue/handlers/video-import.ts2
-rw-r--r--server/lib/job-queue/handlers/video-live-ending.ts4
-rw-r--r--server/lib/job-queue/handlers/video-studio-edition.ts2
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts4
6 files changed, 8 insertions, 8 deletions
diff --git a/server/lib/job-queue/handlers/activitypub-http-fetcher.ts b/server/lib/job-queue/handlers/activitypub-http-fetcher.ts
index 128e14f94..de533de6c 100644
--- a/server/lib/job-queue/handlers/activitypub-http-fetcher.ts
+++ b/server/lib/job-queue/handlers/activitypub-http-fetcher.ts
@@ -17,7 +17,7 @@ async function processActivityPubHttpFetcher (job: Job) {
17 const payload = job.data as ActivitypubHttpFetcherPayload 17 const payload = job.data as ActivitypubHttpFetcherPayload
18 18
19 let video: MVideoFullLight 19 let video: MVideoFullLight
20 if (payload.videoId) video = await VideoModel.loadAndPopulateAccountAndServerAndTags(payload.videoId) 20 if (payload.videoId) video = await VideoModel.loadFull(payload.videoId)
21 21
22 const fetcherType: { [ id in FetchType ]: (items: any[]) => Promise<any> } = { 22 const fetcherType: { [ id in FetchType ]: (items: any[]) => Promise<any> } = {
23 'activity': items => processActivities(items, { outboxUrl: payload.uri, fromFetch: true }), 23 'activity': items => processActivities(items, { outboxUrl: payload.uri, fromFetch: true }),
diff --git a/server/lib/job-queue/handlers/video-file-import.ts b/server/lib/job-queue/handlers/video-file-import.ts
index 110176d81..1c600e2a7 100644
--- a/server/lib/job-queue/handlers/video-file-import.ts
+++ b/server/lib/job-queue/handlers/video-file-import.ts
@@ -18,7 +18,7 @@ async function processVideoFileImport (job: Job) {
18 const payload = job.data as VideoFileImportPayload 18 const payload = job.data as VideoFileImportPayload
19 logger.info('Processing video file import in job %d.', job.id) 19 logger.info('Processing video file import in job %d.', job.id)
20 20
21 const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(payload.videoUUID) 21 const video = await VideoModel.loadFull(payload.videoUUID)
22 // No video, maybe deleted? 22 // No video, maybe deleted?
23 if (!video) { 23 if (!video) {
24 logger.info('Do not process job %d, video does not exist.', job.id) 24 logger.info('Do not process job %d, video does not exist.', job.id)
diff --git a/server/lib/job-queue/handlers/video-import.ts b/server/lib/job-queue/handlers/video-import.ts
index d59a1b12f..40804e82e 100644
--- a/server/lib/job-queue/handlers/video-import.ts
+++ b/server/lib/job-queue/handlers/video-import.ts
@@ -219,7 +219,7 @@ async function processFile (downloader: () => Promise<string>, videoImport: MVid
219 if (previewModel) await video.addAndSaveThumbnail(previewModel, t) 219 if (previewModel) await video.addAndSaveThumbnail(previewModel, t)
220 220
221 // Now we can federate the video (reload from database, we need more attributes) 221 // Now we can federate the video (reload from database, we need more attributes)
222 const videoForFederation = await VideoModel.loadAndPopulateAccountAndServerAndTags(video.uuid, t) 222 const videoForFederation = await VideoModel.loadFull(video.uuid, t)
223 await federateVideoIfNeeded(videoForFederation, true, t) 223 await federateVideoIfNeeded(videoForFederation, true, t)
224 224
225 // Update video import object 225 // Update video import object
diff --git a/server/lib/job-queue/handlers/video-live-ending.ts b/server/lib/job-queue/handlers/video-live-ending.ts
index b2c42664a..0e1bfb240 100644
--- a/server/lib/job-queue/handlers/video-live-ending.ts
+++ b/server/lib/job-queue/handlers/video-live-ending.ts
@@ -144,7 +144,7 @@ async function replaceLiveByReplay (options: {
144 await liveSession.save() 144 await liveSession.save()
145 145
146 // Remove old HLS playlist video files 146 // Remove old HLS playlist video files
147 const videoWithFiles = await VideoModel.loadAndPopulateAccountAndServerAndTags(liveVideo.id) 147 const videoWithFiles = await VideoModel.loadFull(liveVideo.id)
148 148
149 const hlsPlaylist = videoWithFiles.getHLSPlaylist() 149 const hlsPlaylist = videoWithFiles.getHLSPlaylist()
150 await VideoFileModel.removeHLSFilesOfVideoId(hlsPlaylist.id) 150 await VideoFileModel.removeHLSFilesOfVideoId(hlsPlaylist.id)
@@ -241,7 +241,7 @@ async function cleanupLiveAndFederate (options: {
241 } 241 }
242 242
243 try { 243 try {
244 const fullVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(video.id) 244 const fullVideo = await VideoModel.loadFull(video.id)
245 return federateVideoIfNeeded(fullVideo, false, undefined) 245 return federateVideoIfNeeded(fullVideo, false, undefined)
246 } catch (err) { 246 } catch (err) {
247 logger.warn('Cannot federate live after cleanup', { videoId: video.id, err }) 247 logger.warn('Cannot federate live after cleanup', { videoId: video.id, err })
diff --git a/server/lib/job-queue/handlers/video-studio-edition.ts b/server/lib/job-queue/handlers/video-studio-edition.ts
index cf3064a7a..434d0ffe8 100644
--- a/server/lib/job-queue/handlers/video-studio-edition.ts
+++ b/server/lib/job-queue/handlers/video-studio-edition.ts
@@ -44,7 +44,7 @@ async function processVideoStudioEdition (job: Job) {
44 44
45 logger.info('Process video studio edition of %s in job %d.', payload.videoUUID, job.id, lTags) 45 logger.info('Process video studio edition of %s in job %d.', payload.videoUUID, job.id, lTags)
46 46
47 const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(payload.videoUUID) 47 const video = await VideoModel.loadFull(payload.videoUUID)
48 48
49 // No video, maybe deleted? 49 // No video, maybe deleted?
50 if (!video) { 50 if (!video) {
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index 95ee6b384..5afca65ca 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -42,7 +42,7 @@ async function processVideoTranscoding (job: Job) {
42 const payload = job.data as VideoTranscodingPayload 42 const payload = job.data as VideoTranscodingPayload
43 logger.info('Processing transcoding job %d.', job.id, lTags(payload.videoUUID)) 43 logger.info('Processing transcoding job %d.', job.id, lTags(payload.videoUUID))
44 44
45 const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(payload.videoUUID) 45 const video = await VideoModel.loadFull(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, lTags(payload.videoUUID)) 48 logger.info('Do not process job %d, video does not exist.', job.id, lTags(payload.videoUUID))
@@ -180,7 +180,7 @@ async function onVideoFirstWebTorrentTranscoding (
180 const { resolution, isPortraitMode, audioStream } = await videoArg.probeMaxQualityFile() 180 const { resolution, isPortraitMode, audioStream } = await videoArg.probeMaxQualityFile()
181 181
182 // Maybe the video changed in database, refresh it 182 // Maybe the video changed in database, refresh it
183 const videoDatabase = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoArg.uuid) 183 const videoDatabase = await VideoModel.loadFull(videoArg.uuid)
184 // Video does not exist anymore 184 // Video does not exist anymore
185 if (!videoDatabase) return undefined 185 if (!videoDatabase) return undefined
186 186