aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/jobs/handlers/index.ts
blob: 8abddae3585af8c2037828abfe99941016be1b06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import * as videoTranscoder from './video-transcoder'

export interface JobHandler<T> {
  process (data: object): T
  onError (err: Error, jobId: number)
  onSuccess (jobId: number, jobResult: T)
}

const jobHandlers: { [ handlerName: string ]: JobHandler<any> } = {
  videoTranscoder
}

export {
  jobHandlers
}