2017-10-02 12:20:26 +02:00
|
|
|
import * as videoFileOptimizer from './video-file-optimizer'
|
|
|
|
import * as videoFileTranscoder from './video-file-transcoder'
|
2017-05-15 22:22:03 +02:00
|
|
|
|
2017-06-10 22:15:25 +02:00
|
|
|
export interface JobHandler<T> {
|
2017-07-05 13:26:25 +02:00
|
|
|
process (data: object): T
|
|
|
|
onError (err: Error, jobId: number)
|
|
|
|
onSuccess (jobId: number, jobResult: T)
|
2017-06-10 22:15:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const jobHandlers: { [ handlerName: string ]: JobHandler<any> } = {
|
2017-10-02 12:20:26 +02:00
|
|
|
videoFileOptimizer,
|
|
|
|
videoFileTranscoder
|
2017-05-15 22:22:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
jobHandlers
|
|
|
|
}
|