]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/job/job-interface.ts
Create types for model enums
[github/Chocobozzz/PeerTube.git] / server / models / job / job-interface.ts
index ab66782571e2c34cdc33467f2a2c1fd4fa79b46a..31b3773670d0eab841efee7c2c4c30d13202f105 100644 (file)
@@ -1,8 +1,10 @@
 import * as Sequelize from 'sequelize'
 
+import { JobState } from '../../../shared/models/job.model'
+
 export namespace JobMethods {
   export type ListWithLimitCallback = (err: Error, jobInstances: JobInstance[]) => void
-  export type ListWithLimit = (limit: number, state: string, callback: ListWithLimitCallback) => void
+  export type ListWithLimit = (limit: number, state: JobState, callback: ListWithLimitCallback) => void
 }
 
 export interface JobClass {
@@ -10,7 +12,7 @@ export interface JobClass {
 }
 
 export interface JobAttributes {
-  state: string
+  state: JobState
   handlerName: string
   handlerInputData: object
 }