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:
parent
3b01f4c0ac
commit
24516aa26a
8 changed files with 165 additions and 94 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue