mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Update node options Initialization on our scripts (#40302)
* chore(NA): update node options initilization on our scripts * chore(NA): re-export NODE_OPTIONS instead of re-setting on vars * chore(NA): missing doc comment
This commit is contained in:
parent
bd8984b12d
commit
f9fbc5d274
5 changed files with 10 additions and 5 deletions
|
@ -21,4 +21,4 @@ if [ ! -x "$NODE" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
NODE_ENV=production exec "${NODE}" --no-warnings --max-http-header-size=65536 $NODE_OPTIONS "${DIR}/src/cli" ${@}
|
||||
NODE_OPTIONS="--no-warnings --max-http-header-size=65536 ${NODE_OPTIONS}" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli" ${@}
|
||||
|
|
|
@ -21,4 +21,4 @@ if [ ! -x "$NODE" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
NODE_ENV=production exec "${NODE}" $NODE_OPTIONS --no-warnings "${DIR}/src/cli_plugin" "$@"
|
||||
NODE_OPTIONS="--no-warnings ${NODE_OPTIONS}" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli_plugin" "$@"
|
||||
|
|
|
@ -14,7 +14,8 @@ If Not Exist "%NODE%" (
|
|||
)
|
||||
|
||||
TITLE Kibana Server
|
||||
"%NODE%" %NODE_OPTIONS% --no-warnings "%DIR%\src\cli_plugin" %*
|
||||
|
||||
set "NODE_OPTIONS=--no-warnings %NODE_OPTIONS%" && "%NODE%" "%DIR%\src\cli_plugin" %*
|
||||
|
||||
:finally
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ If Not Exist "%NODE%" (
|
|||
Exit /B 1
|
||||
)
|
||||
|
||||
"%NODE%" --no-warnings --max-http-header-size=65536 %NODE_OPTIONS% "%DIR%\src\cli" %*
|
||||
set "NODE_OPTIONS=--no-warnings --max-http-header-size=65536 %NODE_OPTIONS%" && "%NODE%" "%DIR%\src\cli" %*
|
||||
|
||||
:finally
|
||||
|
||||
|
|
|
@ -157,7 +157,11 @@ export default class BaseOptimizer {
|
|||
|
||||
getThreadLoaderPoolConfig() {
|
||||
// Calculate the node options from the NODE_OPTIONS env var
|
||||
const parsedNodeOptions = process.env.NODE_OPTIONS ? process.env.NODE_OPTIONS.split(/\s/) : [];
|
||||
const parsedNodeOptions = process.env.NODE_OPTIONS
|
||||
// thread-loader could not receive empty string as options
|
||||
// or it would break that's why we need to filter here
|
||||
? process.env.NODE_OPTIONS.split(/\s/).filter(opt => !!opt)
|
||||
: [];
|
||||
|
||||
return {
|
||||
name: 'optimizer-thread-loader-main-pool',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue