mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Move job queue to redis
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.
This commit is contained in:
parent
d765fafc3f
commit
94a5ff8a4a
60 changed files with 992 additions and 703 deletions
14
server/helpers/custom-validators/jobs.ts
Normal file
14
server/helpers/custom-validators/jobs.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue