]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/helpers/custom-validators/jobs.ts
Migrate to bull
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / jobs.ts
CommitLineData
94a5ff8a
C
1import { JobState } from '../../../shared/models'
2import { exists } from './misc'
3
94831479 4const jobStates: JobState[] = [ 'active', 'completed', 'failed', 'waiting', 'delayed' ]
94a5ff8a
C
5
6function isValidJobState (value: JobState) {
7 return exists(value) && jobStates.indexOf(value) !== -1
8}
9
10// ---------------------------------------------------------------------------
11
12export {
13 isValidJobState
14}