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