PeerTube/server/lib/jobs/handlers/index.ts

16 lines
313 B
TypeScript
Raw Normal View History

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> {
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
}