aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-25 15:05:18 +0100
committerChocobozzz <me@florianbigard.com>2018-01-25 18:41:17 +0100
commit94a5ff8a4a75d75bb9df542a39ce8769e7a7e6a4 (patch)
tree32a9148e0e4567f0c4ffae0412cbed20b84e8873 /server.ts
parentd765fafc3faf0db9818eb1a07161df1cb1bc0efa (diff)
downloadPeerTube-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.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server.ts b/server.ts
index a138b6359..d0b351c62 100644
--- a/server.ts
+++ b/server.ts
@@ -53,10 +53,11 @@ migrate()
53 53
54// ----------- PeerTube modules ----------- 54// ----------- PeerTube modules -----------
55import { installApplication } from './server/initializers' 55import { installApplication } from './server/initializers'
56import { activitypubHttpJobScheduler, transcodingJobScheduler } from './server/lib/jobs' 56import { JobQueue } from './server/lib/job-queue'
57import { VideosPreviewCache } from './server/lib/cache' 57import { VideosPreviewCache } from './server/lib/cache'
58import { apiRouter, clientsRouter, staticRouter, servicesRouter, webfingerRouter, activityPubRouter } from './server/controllers' 58import { apiRouter, clientsRouter, staticRouter, servicesRouter, webfingerRouter, activityPubRouter } from './server/controllers'
59import { BadActorFollowScheduler } from './server/lib/schedulers/bad-actor-follow-scheduler' 59import { BadActorFollowScheduler } from './server/lib/schedulers/bad-actor-follow-scheduler'
60import { 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)