jobs.ts 387 B

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