diff --git a/server.ts b/server.ts index ad7eb87..cb93f25 100644 --- a/server.ts +++ b/server.ts @@ -149,15 +149,15 @@ app.use(function (err, req, res, next) { app.listen(CONFIG.LISTEN.PORT, async () => { logger.info('Server listening on port %d', CONFIG.LISTEN.PORT) - IndexationScheduler.Instance.enable() - try { await IndexationScheduler.Instance.initIndexes() } catch (err) { - logger.error(err, 'Cannot init videos index.') + logger.error(err, 'Cannot init indexes.') process.exit(-1) } + IndexationScheduler.Instance.enable() + IndexationScheduler.Instance.execute() .catch(err => logger.error(err, 'Cannot run video indexer')) })