aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/video-transcoding.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/handlers/video-transcoding.ts')
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index 5a93c4ed1..20880cdc1 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -1,4 +1,4 @@
1import * as Bull from 'bull' 1import { Job } from 'bull'
2import { TranscodeOptionsType } from '@server/helpers/ffmpeg-utils' 2import { TranscodeOptionsType } from '@server/helpers/ffmpeg-utils'
3import { addTranscodingJob, getTranscodingJobPriority } from '@server/lib/video' 3import { addTranscodingJob, getTranscodingJobPriority } from '@server/lib/video'
4import { VideoPathManager } from '@server/lib/video-path-manager' 4import { VideoPathManager } from '@server/lib/video-path-manager'
@@ -25,7 +25,7 @@ import {
25 transcodeNewWebTorrentResolution 25 transcodeNewWebTorrentResolution
26} from '../../transcoding/video-transcoding' 26} from '../../transcoding/video-transcoding'
27 27
28type HandlerFunction = (job: Bull.Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<void> 28type HandlerFunction = (job: Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<void>
29 29
30const handlers: { [ id in VideoTranscodingPayload['type'] ]: HandlerFunction } = { 30const handlers: { [ id in VideoTranscodingPayload['type'] ]: HandlerFunction } = {
31 'new-resolution-to-hls': handleHLSJob, 31 'new-resolution-to-hls': handleHLSJob,
@@ -36,7 +36,7 @@ const handlers: { [ id in VideoTranscodingPayload['type'] ]: HandlerFunction } =
36 36
37const lTags = loggerTagsFactory('transcoding') 37const lTags = loggerTagsFactory('transcoding')
38 38
39async function processVideoTranscoding (job: Bull.Job) { 39async function processVideoTranscoding (job: Job) {
40 const payload = job.data as VideoTranscodingPayload 40 const payload = job.data as VideoTranscodingPayload
41 logger.info('Processing transcoding job %d.', job.id, lTags(payload.videoUUID)) 41 logger.info('Processing transcoding job %d.', job.id, lTags(payload.videoUUID))
42 42
@@ -64,7 +64,7 @@ async function processVideoTranscoding (job: Bull.Job) {
64// Job handlers 64// Job handlers
65// --------------------------------------------------------------------------- 65// ---------------------------------------------------------------------------
66 66
67async function handleHLSJob (job: Bull.Job, payload: HLSTranscodingPayload, video: MVideoFullLight, user: MUser) { 67async function handleHLSJob (job: Job, payload: HLSTranscodingPayload, video: MVideoFullLight, user: MUser) {
68 logger.info('Handling HLS transcoding job for %s.', video.uuid, lTags(video.uuid)) 68 logger.info('Handling HLS transcoding job for %s.', video.uuid, lTags(video.uuid))
69 69
70 const videoFileInput = payload.copyCodecs 70 const videoFileInput = payload.copyCodecs
@@ -90,7 +90,7 @@ async function handleHLSJob (job: Bull.Job, payload: HLSTranscodingPayload, vide
90} 90}
91 91
92async function handleNewWebTorrentResolutionJob ( 92async function handleNewWebTorrentResolutionJob (
93 job: Bull.Job, 93 job: Job,
94 payload: NewResolutionTranscodingPayload, 94 payload: NewResolutionTranscodingPayload,
95 video: MVideoFullLight, 95 video: MVideoFullLight,
96 user: MUserId 96 user: MUserId
@@ -104,7 +104,7 @@ async function handleNewWebTorrentResolutionJob (
104 await retryTransactionWrapper(onNewWebTorrentFileResolution, video, user, payload) 104 await retryTransactionWrapper(onNewWebTorrentFileResolution, video, user, payload)
105} 105}
106 106
107async function handleWebTorrentMergeAudioJob (job: Bull.Job, payload: MergeAudioTranscodingPayload, video: MVideoFullLight, user: MUserId) { 107async function handleWebTorrentMergeAudioJob (job: Job, payload: MergeAudioTranscodingPayload, video: MVideoFullLight, user: MUserId) {
108 logger.info('Handling merge audio transcoding job for %s.', video.uuid, lTags(video.uuid)) 108 logger.info('Handling merge audio transcoding job for %s.', video.uuid, lTags(video.uuid))
109 109
110 await mergeAudioVideofile(video, payload.resolution, job) 110 await mergeAudioVideofile(video, payload.resolution, job)
@@ -114,7 +114,7 @@ async function handleWebTorrentMergeAudioJob (job: Bull.Job, payload: MergeAudio
114 await retryTransactionWrapper(onVideoFileOptimizer, video, payload, 'video', user) 114 await retryTransactionWrapper(onVideoFileOptimizer, video, payload, 'video', user)
115} 115}
116 116
117async function handleWebTorrentOptimizeJob (job: Bull.Job, payload: OptimizeTranscodingPayload, video: MVideoFullLight, user: MUserId) { 117async function handleWebTorrentOptimizeJob (job: Job, payload: OptimizeTranscodingPayload, video: MVideoFullLight, user: MUserId) {
118 logger.info('Handling optimize transcoding job for %s.', video.uuid, lTags(video.uuid)) 118 logger.info('Handling optimize transcoding job for %s.', video.uuid, lTags(video.uuid))
119 119
120 const { transcodeType } = await optimizeOriginalVideofile(video, video.getMaxQualityFile(), job) 120 const { transcodeType } = await optimizeOriginalVideofile(video, video.getMaxQualityFile(), job)