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/video-import.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/lib/job-queue/handlers/video-import.ts b/server/lib/job-queue/handlers/video-import.ts
index 3b9d08d3b..cdfe412cc 100644
--- a/server/lib/job-queue/handlers/video-import.ts
+++ b/server/lib/job-queue/handlers/video-import.ts
@@ -98,8 +98,9 @@ async function processVideoImport (job: Bull.Job) {
98 video.state = CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED 98 video.state = CONFIG.TRANSCODING.ENABLED ? VideoState.TO_TRANSCODE : VideoState.PUBLISHED
99 const videoUpdated = await video.save({ transaction: t }) 99 const videoUpdated = await video.save({ transaction: t })
100 100
101 // Now we can federate the video 101 // Now we can federate the video (reload from database, we need more attributes)
102 await federateVideoIfNeeded(video, true, t) 102 const videoForFederation = await VideoModel.loadByUUIDAndPopulateAccountAndServerAndTags(video.uuid, t)
103 await federateVideoIfNeeded(videoForFederation, true, t)
103 104
104 // Update video import object 105 // Update video import object
105 videoImport.state = VideoImportState.SUCCESS 106 videoImport.state = VideoImportState.SUCCESS