Wait index creaction
This commit is contained in:
parent
6d96cfab43
commit
71e310f639
|
@ -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'))
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue