Improve child performances (#1314)

This commit is contained in:
Tomas Della Vedova
2020-09-23 11:31:09 +02:00
committed by delvedor
parent 35eb96e2b4
commit 3db1bed4bd
368 changed files with 17064 additions and 32728 deletions

View File

@ -57,13 +57,19 @@ function build (opts = {}) {
stash.clear()
try {
await client.indices.deleteAlias({ index: '_all', name: '_all' }, { ignore: 404 })
await client.indices.deleteAlias({
index: '_all',
name: '_all'
}, { ignore: [404] })
} catch (err) {
assert.ifError(err, 'should not error: indices.deleteAlias')
}
try {
await client.indices.delete({ index: '_all', expandWildcards: 'all' }, { ignore: 404 })
await client.indices.delete({
index: '_all',
expand_wildcards: 'open,closed,hidden'
}, { ignore: [404] })
} catch (err) {
assert.ifError(err, 'should not error: indices.delete')
}
@ -386,6 +392,7 @@ function build (opts = {}) {
}
const options = { ignore: cmd.params.ignore, headers: action.headers }
if (!Array.isArray(options.ignore)) options.ignore = [options.ignore]
if (cmd.params.ignore) delete cmd.params.ignore
const [err, result] = await to(api(cmd.params, options))