2017-05-15 15:22:03 -05:00
|
|
|
import * as videoTranscoder from './video-transcoder'
|
|
|
|
|
2017-06-10 15:15:25 -05:00
|
|
|
export interface JobHandler<T> {
|
2017-07-05 06:26:25 -05:00
|
|
|
process (data: object): T
|
|
|
|
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-05-15 15:22:03 -05:00
|
|
|
videoTranscoder
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
jobHandlers
|
|
|
|
}
|