]>
Commit | Line | Data |
---|---|---|
1 | import { VideoConstant } from '../videos' | |
2 | import { RunnerJobPayload } from './runner-job-payload.model' | |
3 | import { RunnerJobPrivatePayload } from './runner-job-private-payload.model' | |
4 | import { RunnerJobState } from './runner-job-state.model' | |
5 | import { RunnerJobType } from './runner-job-type.type' | |
6 | ||
7 | export interface RunnerJob <T extends RunnerJobPayload = RunnerJobPayload> { | |
8 | uuid: string | |
9 | ||
10 | type: RunnerJobType | |
11 | ||
12 | state: VideoConstant<RunnerJobState> | |
13 | ||
14 | payload: T | |
15 | ||
16 | failures: number | |
17 | error: string | null | |
18 | ||
19 | progress: number | |
20 | priority: number | |
21 | ||
22 | startedAt: Date | string | |
23 | createdAt: Date | string | |
24 | updatedAt: Date | string | |
25 | finishedAt: Date | string | |
26 | ||
27 | parent?: { | |
28 | type: RunnerJobType | |
29 | state: VideoConstant<RunnerJobState> | |
30 | uuid: string | |
31 | } | |
32 | ||
33 | // If associated to a runner | |
34 | runner?: { | |
35 | id: number | |
36 | name: string | |
37 | ||
38 | description: string | |
39 | } | |
40 | } | |
41 | ||
42 | // eslint-disable-next-line max-len | |
43 | export interface RunnerJobAdmin <T extends RunnerJobPayload = RunnerJobPayload, U extends RunnerJobPrivatePayload = RunnerJobPrivatePayload> extends RunnerJob<T> { | |
44 | privatePayload: U | |
45 | } |