diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 10:36:18 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 10:36:18 +0200 |
commit | ee9e7b61f59a427208386738057c8eff48fba599 (patch) | |
tree | 9097de886128e15f21f0b5920a2076d16a087467 /server/models/job/job-interface.ts | |
parent | 70c065d64c330196d371941d9294a55da6e3aa37 (diff) | |
download | PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.tar.gz PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.tar.zst PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.zip |
Create types for model enums
Diffstat (limited to 'server/models/job/job-interface.ts')
-rw-r--r-- | server/models/job/job-interface.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/models/job/job-interface.ts b/server/models/job/job-interface.ts index ab6678257..31b377367 100644 --- a/server/models/job/job-interface.ts +++ b/server/models/job/job-interface.ts | |||
@@ -1,8 +1,10 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | 2 | ||
3 | import { JobState } from '../../../shared/models/job.model' | ||
4 | |||
3 | export namespace JobMethods { | 5 | export namespace JobMethods { |
4 | export type ListWithLimitCallback = (err: Error, jobInstances: JobInstance[]) => void | 6 | export type ListWithLimitCallback = (err: Error, jobInstances: JobInstance[]) => void |
5 | export type ListWithLimit = (limit: number, state: string, callback: ListWithLimitCallback) => void | 7 | export type ListWithLimit = (limit: number, state: JobState, callback: ListWithLimitCallback) => void |
6 | } | 8 | } |
7 | 9 | ||
8 | export interface JobClass { | 10 | export interface JobClass { |
@@ -10,7 +12,7 @@ export interface JobClass { | |||
10 | } | 12 | } |
11 | 13 | ||
12 | export interface JobAttributes { | 14 | export interface JobAttributes { |
13 | state: string | 15 | state: JobState |
14 | handlerName: string | 16 | handlerName: string |
15 | handlerInputData: object | 17 | handlerInputData: object |
16 | } | 18 | } |