Skip to content

Commit

Permalink
fix some more violations
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Sep 9, 2021
1 parent 7d07a1a commit 8f3b502
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x-pack/plugins/event_log/server/es/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import { IndicesAlias, IndicesIndexStatePrefixedSettings } from '@elastic/elasticsearch/api/types';
import { estypes } from '@elastic/elasticsearch';
import { asyncForEach } from '@kbn/std';
import { getIlmPolicy, getIndexTemplate } from './documents';
import { EsContext } from './context';

Expand Down Expand Up @@ -56,7 +57,7 @@ class EsInitializationSteps {
this.esContext.logger.error(`error getting existing index templates - ${err.message}`);
}

Object.keys(indexTemplates).forEach(async (indexTemplateName: string) => {
asyncForEach(Object.keys(indexTemplates), async (indexTemplateName: string) => {
try {
const hidden: string | boolean = indexTemplates[indexTemplateName]?.settings?.index?.hidden;
// Check to see if this index template is hidden
Expand Down Expand Up @@ -93,8 +94,7 @@ class EsInitializationSteps {
// should not block the rest of initialization, log the error and move on
this.esContext.logger.error(`error getting existing indices - ${err.message}`);
}

Object.keys(indices).forEach(async (indexName: string) => {
asyncForEach(Object.keys(indices), async (indexName: string) => {
try {
const hidden: string | boolean | undefined = (indices[indexName]
?.settings as IndicesIndexStatePrefixedSettings)?.index?.hidden;
Expand Down Expand Up @@ -127,7 +127,7 @@ class EsInitializationSteps {
// should not block the rest of initialization, log the error and move on
this.esContext.logger.error(`error getting existing index aliases - ${err.message}`);
}
Object.keys(indexAliases).forEach(async (indexName: string) => {
asyncForEach(Object.keys(indexAliases), async (indexName: string) => {
try {
const aliases = indexAliases[indexName]?.aliases;
const hasNotHiddenAliases: boolean = Object.keys(aliases).some((alias: string) => {
Expand Down

0 comments on commit 8f3b502

Please sign in to comment.