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