]>
Commit | Line | Data |
---|---|---|
94a5ff8a C |
1 | import { JobState } from '../../../shared/models' |
2 | import { exists } from './misc' | |
3 | ||
94831479 | 4 | const jobStates: JobState[] = [ 'active', 'completed', 'failed', 'waiting', 'delayed' ] |
94a5ff8a C |
5 | |
6 | function isValidJobState (value: JobState) { | |
7 | return exists(value) && jobStates.indexOf(value) !== -1 | |
8 | } | |
9 | ||
10 | // --------------------------------------------------------------------------- | |
11 | ||
12 | export { | |
13 | isValidJobState | |
14 | } |