* 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
f40aa17df6
commit
28fca42374
|
@ -21,4 +21,4 @@ if [ ! -x "$NODE" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
exit 1
|
||||||
fi
|
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
|
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
|
:finally
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ If Not Exist "%NODE%" (
|
||||||
Exit /B 1
|
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
|
:finally
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,11 @@ export default class BaseOptimizer {
|
||||||
|
|
||||||
getThreadLoaderPoolConfig() {
|
getThreadLoaderPoolConfig() {
|
||||||
// Calculate the node options from the NODE_OPTIONS env var
|
// 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 {
|
return {
|
||||||
name: 'optimizer-thread-loader-main-pool',
|
name: 'optimizer-thread-loader-main-pool',
|
||||||
|
|
Loading…
Reference in a new issue