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.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.ts')
-rw-r--r-- | server.ts | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -53,10 +53,11 @@ migrate() | |||
53 | 53 | ||
54 | // ----------- PeerTube modules ----------- | 54 | // ----------- PeerTube modules ----------- |
55 | import { installApplication } from './server/initializers' | 55 | import { installApplication } from './server/initializers' |
56 | import { activitypubHttpJobScheduler, transcodingJobScheduler } from './server/lib/jobs' | 56 | import { JobQueue } from './server/lib/job-queue' |
57 | import { VideosPreviewCache } from './server/lib/cache' | 57 | import { VideosPreviewCache } from './server/lib/cache' |
58 | import { apiRouter, clientsRouter, staticRouter, servicesRouter, webfingerRouter, activityPubRouter } from './server/controllers' | 58 | import { apiRouter, clientsRouter, staticRouter, servicesRouter, webfingerRouter, activityPubRouter } from './server/controllers' |
59 | import { BadActorFollowScheduler } from './server/lib/schedulers/bad-actor-follow-scheduler' | 59 | import { BadActorFollowScheduler } from './server/lib/schedulers/bad-actor-follow-scheduler' |
60 | import { RemoveOldJobsScheduler } from './server/lib/schedulers/remove-old-jobs-scheduler' | ||
60 | 61 | ||
61 | // ----------- Command line ----------- | 62 | // ----------- Command line ----------- |
62 | 63 | ||
@@ -170,9 +171,8 @@ function onDatabaseInitDone () { | |||
170 | server.listen(port, () => { | 171 | server.listen(port, () => { |
171 | VideosPreviewCache.Instance.init(CONFIG.CACHE.PREVIEWS.SIZE) | 172 | VideosPreviewCache.Instance.init(CONFIG.CACHE.PREVIEWS.SIZE) |
172 | BadActorFollowScheduler.Instance.enable() | 173 | BadActorFollowScheduler.Instance.enable() |
173 | 174 | RemoveOldJobsScheduler.Instance.enable() | |
174 | activitypubHttpJobScheduler.activate() | 175 | JobQueue.Instance.init() |
175 | transcodingJobScheduler.activate() | ||
176 | 176 | ||
177 | logger.info('Server listening on port %d', port) | 177 | logger.info('Server listening on port %d', port) |
178 | logger.info('Web server: %s', CONFIG.WEBSERVER.URL) | 178 | logger.info('Web server: %s', CONFIG.WEBSERVER.URL) |