log es setup status

This commit is contained in:
Andris Reinman 2023-01-12 11:43:01 +02:00
parent a1e17d9d10
commit a416228eeb
No known key found for this signature in database
GPG key ID: DC6C83F4D584D364

View file

@ -67,6 +67,9 @@ if (!processCount || processCount <= 1) {
// single process mode, do not fork anything
initElasticSearch()
.then(() => {
log.info('App', `ElasticSearch setup checked`);
})
.catch(err => {
log.error('App', `ElasticSearch setup failed: ${err.message}${err.meta?.statusCode ? ` (${err.meta?.statusCode})` : ''}`);
})
@ -95,6 +98,9 @@ if (!processCount || processCount <= 1) {
// Fork workers.
initElasticSearch()
.then(() => {
log.info('App', `ElasticSearch setup checked`);
})
.catch(err => {
log.error('App', `ElasticSearch setup failed: ${err.message}${err.meta?.statusCode ? ` (${err.meta?.statusCode})` : ''}`);
})