diff options
Diffstat (limited to 'server/lib/jobs/handlers/index.ts')
-rw-r--r-- | server/lib/jobs/handlers/index.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/server/lib/jobs/handlers/index.ts b/server/lib/jobs/handlers/index.ts index 7d0263b15..8abddae35 100644 --- a/server/lib/jobs/handlers/index.ts +++ b/server/lib/jobs/handlers/index.ts | |||
@@ -1,11 +1,9 @@ | |||
1 | import * as videoTranscoder from './video-transcoder' | 1 | import * as videoTranscoder from './video-transcoder' |
2 | 2 | ||
3 | import { VideoInstance } from '../../../models' | ||
4 | |||
5 | export interface JobHandler<T> { | 3 | export interface JobHandler<T> { |
6 | process (data: object, callback: (err: Error, videoInstance?: T) => void) | 4 | process (data: object): T |
7 | onError (err: Error, jobId: number, video: T, callback: (err: Error) => void) | 5 | onError (err: Error, jobId: number) |
8 | onSuccess (data: any, jobId: number, video: T, callback: (err: Error) => void) | 6 | onSuccess (jobId: number, jobResult: T) |
9 | } | 7 | } |
10 | 8 | ||
11 | const jobHandlers: { [ handlerName: string ]: JobHandler<any> } = { | 9 | const jobHandlers: { [ handlerName: string ]: JobHandler<any> } = { |