From 571389d43b8fc8aaf27e77c06f19b320b08dbbc9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 10 Nov 2017 17:27:49 +0100 Subject: Make it compile at least --- server.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'server.ts') 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()) // ----------- PeerTube modules ----------- import { migrate, installApplication } from './server/initializers' -import { JobScheduler, activateSchedulers, VideosPreviewCache } from './server/lib' +import { httpRequestJobScheduler, transcodingJobScheduler, VideosPreviewCache } from './server/lib' import { apiRouter, clientsRouter, staticRouter, servicesRouter } from './server/controllers' // ----------- Command line ----------- @@ -146,19 +146,13 @@ function onDatabaseInitDone () { const port = CONFIG.LISTEN.PORT // Run the migration scripts if needed migrate() - .then(() => { - return installApplication() - }) + .then(() => installApplication()) .then(() => { // ----------- Make the server listening ----------- - server.listen(port, function () { - // Activate the communication with friends - activateSchedulers() - - // Activate job scheduler - JobScheduler.Instance.activate() - + server.listen(port, () => { VideosPreviewCache.Instance.init(CONFIG.CACHE.PREVIEWS.SIZE) + httpRequestJobScheduler.activate() + transcodingJobScheduler.activate() logger.info('Server listening on port %d', port) logger.info('Web server: %s', CONFIG.WEBSERVER.URL) -- cgit v1.2.3