diff options
Diffstat (limited to 'server/lib/job-queue/handlers/video-transcoding.ts')
-rw-r--r-- | server/lib/job-queue/handlers/video-transcoding.ts | 14 |
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 @@ | |||
1 | import * as Bull from 'bull' | 1 | import { Job } from 'bull' |
2 | import { TranscodeOptionsType } from '@server/helpers/ffmpeg-utils' | 2 | import { TranscodeOptionsType } from '@server/helpers/ffmpeg-utils' |
3 | import { addTranscodingJob, getTranscodingJobPriority } from '@server/lib/video' | 3 | import { addTranscodingJob, getTranscodingJobPriority } from '@server/lib/video' |
4 | import { VideoPathManager } from '@server/lib/video-path-manager' | 4 | import { 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 | ||
28 | type HandlerFunction = (job: Bull.Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<void> | 28 | type HandlerFunction = (job: Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<void> |
29 | 29 | ||
30 | const handlers: { [ id in VideoTranscodingPayload['type'] ]: HandlerFunction } = { | 30 | const 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 | ||
37 | const lTags = loggerTagsFactory('transcoding') | 37 | const lTags = loggerTagsFactory('transcoding') |
38 | 38 | ||
39 | async function processVideoTranscoding (job: Bull.Job) { | 39 | async 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 | ||
67 | async function handleHLSJob (job: Bull.Job, payload: HLSTranscodingPayload, video: MVideoFullLight, user: MUser) { | 67 | async 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 | ||
92 | async function handleNewWebTorrentResolutionJob ( | 92 | async 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 | ||
107 | async function handleWebTorrentMergeAudioJob (job: Bull.Job, payload: MergeAudioTranscodingPayload, video: MVideoFullLight, user: MUserId) { | 107 | async 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 | ||
117 | async function handleWebTorrentOptimizeJob (job: Bull.Job, payload: OptimizeTranscodingPayload, video: MVideoFullLight, user: MUserId) { | 117 | async 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) |