aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-10 17:27:49 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:51 +0100
commit571389d43b8fc8aaf27e77c06f19b320b08dbbc9 (patch)
treee57173bcd0590d939c28952a29258fd02a281e35 /server.ts
parent38fa2065831b5f55be0d7f30f19a62c967397208 (diff)
downloadPeerTube-571389d43b8fc8aaf27e77c06f19b320b08dbbc9.tar.gz
PeerTube-571389d43b8fc8aaf27e77c06f19b320b08dbbc9.tar.zst
PeerTube-571389d43b8fc8aaf27e77c06f19b320b08dbbc9.zip
Make it compile at least
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts16
1 files changed, 5 insertions, 11 deletions
diff --git a/server.ts b/server.ts
index f50e5bad4..0878fe757 100644
--- a/server.ts
+++ b/server.ts
@@ -46,7 +46,7 @@ db.init(false).then(() => onDatabaseInitDone())
46 46
47// ----------- PeerTube modules ----------- 47// ----------- PeerTube modules -----------
48import { migrate, installApplication } from './server/initializers' 48import { migrate, installApplication } from './server/initializers'
49import { JobScheduler, activateSchedulers, VideosPreviewCache } from './server/lib' 49import { httpRequestJobScheduler, transcodingJobScheduler, VideosPreviewCache } from './server/lib'
50import { apiRouter, clientsRouter, staticRouter, servicesRouter } from './server/controllers' 50import { apiRouter, clientsRouter, staticRouter, servicesRouter } from './server/controllers'
51 51
52// ----------- Command line ----------- 52// ----------- Command line -----------
@@ -146,19 +146,13 @@ function onDatabaseInitDone () {
146 const port = CONFIG.LISTEN.PORT 146 const port = CONFIG.LISTEN.PORT
147 // Run the migration scripts if needed 147 // Run the migration scripts if needed
148 migrate() 148 migrate()
149 .then(() => { 149 .then(() => installApplication())
150 return installApplication()
151 })
152 .then(() => { 150 .then(() => {
153 // ----------- Make the server listening ----------- 151 // ----------- Make the server listening -----------
154 server.listen(port, function () { 152 server.listen(port, () => {
155 // Activate the communication with friends
156 activateSchedulers()
157
158 // Activate job scheduler
159 JobScheduler.Instance.activate()
160
161 VideosPreviewCache.Instance.init(CONFIG.CACHE.PREVIEWS.SIZE) 153 VideosPreviewCache.Instance.init(CONFIG.CACHE.PREVIEWS.SIZE)
154 httpRequestJobScheduler.activate()
155 transcodingJobScheduler.activate()
162 156
163 logger.info('Server listening on port %d', port) 157 logger.info('Server listening on port %d', port)
164 logger.info('Web server: %s', CONFIG.WEBSERVER.URL) 158 logger.info('Web server: %s', CONFIG.WEBSERVER.URL)