]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/helpers/custom-validators/jobs.ts
Add create-import-video-file-job command
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / jobs.ts
1 import { JobState } from '../../../shared/models'
2 import { exists } from './misc'
3
4 const jobStates: JobState[] = [ 'active', 'complete', 'failed', 'inactive', 'delayed' ]
5
6 function isValidJobState (value: JobState) {
7 return exists(value) && jobStates.indexOf(value) !== -1
8 }
9
10 // ---------------------------------------------------------------------------
11
12 export {
13 isValidJobState
14 }