diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-03 16:23:45 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-06 11:19:16 +0200 |
commit | 590fb5069038e69898123bb795f789683216d837 (patch) | |
tree | ddb3d1830b7d64ebae214dd65a94dd3d16324819 /server/lib/job-queue | |
parent | 5d08a6a74e83f2e4dfe2f3ba7f5a39371e1bc89e (diff) | |
download | PeerTube-590fb5069038e69898123bb795f789683216d837.tar.gz PeerTube-590fb5069038e69898123bb795f789683216d837.tar.zst PeerTube-590fb5069038e69898123bb795f789683216d837.zip |
Add tests regarding video import
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r-- | server/lib/job-queue/handlers/video-import.ts | 5 |
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 |