aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts')
-rw-r--r--server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts13
1 files changed, 9 insertions, 4 deletions
diff --git a/server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts b/server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts
index d7c614fb8..c5efe8eeb 100644
--- a/server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts
+++ b/server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts
@@ -1,10 +1,14 @@
1import { JobScheduler, JobHandler } from '../job-scheduler' 1import { JobCategory } from '../../../../shared'
2 2import { JobHandler, JobScheduler } from '../job-scheduler'
3import * as videoFileOptimizer from './video-file-optimizer-handler' 3import * as videoFileOptimizer from './video-file-optimizer-handler'
4import * as videoFileTranscoder from './video-file-transcoder-handler' 4import * as videoFileTranscoder from './video-file-transcoder-handler'
5import { JobCategory } from '../../../../shared' 5import { VideoInstance } from '../../../models/video/video-interface'
6 6
7const jobHandlers: { [ handlerName: string ]: JobHandler<any> } = { 7type TranscodingJobPayload = {
8 videoUUID: string
9 resolution?: number
10}
11const jobHandlers: { [ handlerName: string ]: JobHandler<TranscodingJobPayload, VideoInstance> } = {
8 videoFileOptimizer, 12 videoFileOptimizer,
9 videoFileTranscoder 13 videoFileTranscoder
10} 14}
@@ -13,5 +17,6 @@ const jobCategory: JobCategory = 'transcoding'
13const transcodingJobScheduler = new JobScheduler(jobCategory, jobHandlers) 17const transcodingJobScheduler = new JobScheduler(jobCategory, jobHandlers)
14 18
15export { 19export {
20 TranscodingJobPayload,
16 transcodingJobScheduler 21 transcodingJobScheduler
17} 22}