diff options
Diffstat (limited to 'server/helpers/custom-validators/jobs.ts')
-rw-r--r-- | server/helpers/custom-validators/jobs.ts | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/server/helpers/custom-validators/jobs.ts b/server/helpers/custom-validators/jobs.ts deleted file mode 100644 index c168b3e91..000000000 --- a/server/helpers/custom-validators/jobs.ts +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | import { JobState } from '../../../shared/models' | ||
2 | import { exists } from './misc' | ||
3 | import { jobTypes } from '@server/lib/job-queue/job-queue' | ||
4 | |||
5 | const jobStates: JobState[] = [ 'active', 'completed', 'failed', 'waiting', 'delayed', 'paused', 'waiting-children' ] | ||
6 | |||
7 | function isValidJobState (value: JobState) { | ||
8 | return exists(value) && jobStates.includes(value) | ||
9 | } | ||
10 | |||
11 | function isValidJobType (value: any) { | ||
12 | return exists(value) && jobTypes.includes(value) | ||
13 | } | ||
14 | |||
15 | // --------------------------------------------------------------------------- | ||
16 | |||
17 | export { | ||
18 | jobStates, | ||
19 | isValidJobState, | ||
20 | isValidJobType | ||
21 | } | ||