refactor: move template/aggregation generation

This commit is contained in:
Rainer Killinger
2020-02-25 16:57:12 +01:00
committed by Rainer Killinger
parent b629d058eb
commit c2728b2a1d

View File

@@ -205,6 +205,9 @@ export class Elasticsearch implements Database {
this.aliasMap = {};
this.ready = false;
checkESTemplate(typeof process.env.ES_FORCE_MAPPING_UPDATE !== 'undefined' ?
process.env.ES_FORCE_MAPPING_UPDATE === 'true' : false);
this.aggregationsSchema = buildAggregations();
this.mailQueue = mailQueue;
@@ -484,9 +487,6 @@ export class Elasticsearch implements Database {
Monitoring.setUp(monitoringConfiguration, this.client, this.mailQueue);
}
checkESTemplate(typeof process.env.ES_FORCE_MAPPING_UPDATE !== 'undefined' ?
process.env.ES_FORCE_MAPPING_UPDATE === 'true' : false);
return this.getAliasMap();
}