aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-30 13:27:07 +0100
committerChocobozzz <me@florianbigard.com>2018-01-30 13:27:07 +0100
commitecb4e35f4e6c7304cb274593c13cb47fd5078b75 (patch)
tree1e238002340bc521afde59d52f406e41298a7aac /server.ts
parent80d1057bfcd3582af0dacf5ccd5a7a93ef95410b (diff)
downloadPeerTube-ecb4e35f4e6c7304cb274593c13cb47fd5078b75.tar.gz
PeerTube-ecb4e35f4e6c7304cb274593c13cb47fd5078b75.tar.zst
PeerTube-ecb4e35f4e6c7304cb274593c13cb47fd5078b75.zip
Add ability to reset our password
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/server.ts b/server.ts
index d0b351c62..44e93d1a6 100644
--- a/server.ts
+++ b/server.ts
@@ -53,9 +53,11 @@ migrate()
53 53
54// ----------- PeerTube modules ----------- 54// ----------- PeerTube modules -----------
55import { installApplication } from './server/initializers' 55import { installApplication } from './server/initializers'
56import { Emailer } from './server/lib/emailer'
56import { JobQueue } from './server/lib/job-queue' 57import { JobQueue } from './server/lib/job-queue'
57import { VideosPreviewCache } from './server/lib/cache' 58import { VideosPreviewCache } from './server/lib/cache'
58import { apiRouter, clientsRouter, staticRouter, servicesRouter, webfingerRouter, activityPubRouter } from './server/controllers' 59import { apiRouter, clientsRouter, staticRouter, servicesRouter, webfingerRouter, activityPubRouter } from './server/controllers'
60import { Redis } from './server/lib/redis'
59import { BadActorFollowScheduler } from './server/lib/schedulers/bad-actor-follow-scheduler' 61import { BadActorFollowScheduler } from './server/lib/schedulers/bad-actor-follow-scheduler'
60import { RemoveOldJobsScheduler } from './server/lib/schedulers/remove-old-jobs-scheduler' 62import { RemoveOldJobsScheduler } from './server/lib/schedulers/remove-old-jobs-scheduler'
61 63
@@ -169,10 +171,20 @@ function onDatabaseInitDone () {
169 .then(() => { 171 .then(() => {
170 // ----------- Make the server listening ----------- 172 // ----------- Make the server listening -----------
171 server.listen(port, () => { 173 server.listen(port, () => {
174 // Emailer initialization and then job queue initialization
175 Emailer.Instance.init()
176 Emailer.Instance.checkConnectionOrDie()
177 .then(() => JobQueue.Instance.init())
178
179 // Caches initializations
172 VideosPreviewCache.Instance.init(CONFIG.CACHE.PREVIEWS.SIZE) 180 VideosPreviewCache.Instance.init(CONFIG.CACHE.PREVIEWS.SIZE)
181
182 // Enable Schedulers
173 BadActorFollowScheduler.Instance.enable() 183 BadActorFollowScheduler.Instance.enable()
174 RemoveOldJobsScheduler.Instance.enable() 184 RemoveOldJobsScheduler.Instance.enable()
175 JobQueue.Instance.init() 185
186 // Redis initialization
187 Redis.Instance.init()
176 188
177 logger.info('Server listening on port %d', port) 189 logger.info('Server listening on port %d', port)
178 logger.info('Web server: %s', CONFIG.WEBSERVER.URL) 190 logger.info('Web server: %s', CONFIG.WEBSERVER.URL)