diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-25 15:05:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-25 18:41:17 +0100 |
commit | 94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4 (patch) | |
tree | 32a9148e0e4567f0c4ffae0412cbed20b84e8873 /server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts | |
parent | d765fafc3faf0db9818eb1a07161df1cb1bc0efa (diff) | |
download | PeerTube-94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4.tar.gz PeerTube-94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4.tar.zst PeerTube-94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4.zip |
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.
Diffstat (limited to 'server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts')
-rw-r--r-- | server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts b/server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts deleted file mode 100644 index e5530a73c..000000000 --- a/server/lib/jobs/transcoding-job-scheduler/transcoding-job-scheduler.ts +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | import { JobCategory } from '../../../../shared' | ||
2 | import { VideoModel } from '../../../models/video/video' | ||
3 | import { JobHandler, JobScheduler } from '../job-scheduler' | ||
4 | |||
5 | import * as videoFileOptimizer from './video-file-optimizer-handler' | ||
6 | import * as videoFileTranscoder from './video-file-transcoder-handler' | ||
7 | |||
8 | type TranscodingJobPayload = { | ||
9 | videoUUID: string | ||
10 | resolution?: number | ||
11 | } | ||
12 | const jobHandlers: { [ handlerName: string ]: JobHandler<TranscodingJobPayload, VideoModel> } = { | ||
13 | videoFileOptimizer, | ||
14 | videoFileTranscoder | ||
15 | } | ||
16 | const jobCategory: JobCategory = 'transcoding' | ||
17 | |||
18 | const transcodingJobScheduler = new JobScheduler(jobCategory, jobHandlers) | ||
19 | |||
20 | export { | ||
21 | TranscodingJobPayload, | ||
22 | transcodingJobScheduler | ||
23 | } | ||