diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-10 17:27:49 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:51 +0100 |
commit | 571389d43b8fc8aaf27e77c06f19b320b08dbbc9 (patch) | |
tree | e57173bcd0590d939c28952a29258fd02a281e35 /server.ts | |
parent | 38fa2065831b5f55be0d7f30f19a62c967397208 (diff) | |
download | PeerTube-571389d43b8fc8aaf27e77c06f19b320b08dbbc9.tar.gz PeerTube-571389d43b8fc8aaf27e77c06f19b320b08dbbc9.tar.zst PeerTube-571389d43b8fc8aaf27e77c06f19b320b08dbbc9.zip |
Make it compile at least
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -46,7 +46,7 @@ db.init(false).then(() => onDatabaseInitDone()) | |||
46 | 46 | ||
47 | // ----------- PeerTube modules ----------- | 47 | // ----------- PeerTube modules ----------- |
48 | import { migrate, installApplication } from './server/initializers' | 48 | import { migrate, installApplication } from './server/initializers' |
49 | import { JobScheduler, activateSchedulers, VideosPreviewCache } from './server/lib' | 49 | import { httpRequestJobScheduler, transcodingJobScheduler, VideosPreviewCache } from './server/lib' |
50 | import { apiRouter, clientsRouter, staticRouter, servicesRouter } from './server/controllers' | 50 | import { 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) |