94a5ff8a4a
We'll use it as cache in the future. /!\ You'll loose your old jobs (pending jobs too) so upgrade only when you don't have pending job anymore.
14 lines
387 B
TypeScript
14 lines
387 B
TypeScript
import { JobState } from '../../../shared/models'
|
|
import { exists } from './misc'
|
|
|
|
const jobStates: JobState[] = [ 'active', 'complete', 'failed', 'inactive', 'delayed' ]
|
|
|
|
function isValidJobState (value: JobState) {
|
|
return exists(value) && jobStates.indexOf(value) !== -1
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export {
|
|
isValidJobState
|
|
}
|