2017-05-15 22:22:03 +02:00
|
|
|
import * as videoTranscoder from './video-transcoder'
|
|
|
|
|
2017-06-10 22:15:25 +02:00
|
|
|
import { VideoInstance } from '../../../models'
|
|
|
|
|
|
|
|
export interface JobHandler<T> {
|
|
|
|
process (data: object, callback: (err: Error, videoInstance?: T) => void)
|
|
|
|
onError (err: Error, jobId: number, video: T, callback: (err: Error) => void)
|
|
|
|
onSuccess (data: any, jobId: number, video: T, callback: (err: Error) => void)
|
|
|
|
}
|
|
|
|
|
|
|
|
const jobHandlers: { [ handlerName: string ]: JobHandler<any> } = {
|
2017-05-15 22:22:03 +02:00
|
|
|
videoTranscoder
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
jobHandlers
|
|
|
|
}
|