1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Refactor transcoding job handlers

This commit is contained in:
Chocobozzz 2021-01-21 15:58:17 +01:00
parent 3b01f4c0ac
commit 24516aa26a
No known key found for this signature in database
GPG key ID: 583A612D890159BE
8 changed files with 165 additions and 94 deletions

View file

@ -9,7 +9,7 @@ import { getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffprob
import { logger } from '../../../helpers/logger'
import { VideoModel } from '../../../models/video/video'
import { VideoFileModel } from '../../../models/video/video-file'
import { publishNewResolutionIfNeeded } from './video-transcoding'
import { onNewWebTorrentFileResolution } from './video-transcoding'
async function processVideoFileImport (job: Bull.Job) {
const payload = job.data as VideoFileImportPayload
@ -24,7 +24,7 @@ async function processVideoFileImport (job: Bull.Job) {
await updateVideoFile(video, payload.filePath)
await publishNewResolutionIfNeeded(video)
await onNewWebTorrentFileResolution(video)
return video
}