Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

just print values for missed env vars at startup #687

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Add: X-Processing-Time response header with processing time (in milliseconds) expended by current HTTP measure (iotagent-node-lib#1650)
- Add: print also IOTA_CONFIG_RETRIEVAL, IOTA_DEFAULT_KEY, IOTA_DEFAULT_TRANSPORT env var values at iotagent startup
10 changes: 6 additions & 4 deletions lib/configService.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ function processEnvironmentVariables() {
'IOTA_HTTP_PORT',
'IOTA_HTTP_TIMEOUT',
'IOTA_HTTP_KEY',
'IOTA_HTTP_CERT'
'IOTA_HTTP_CERT',
'IOTA_CONFIG_RETRIEVAL',
'IOTA_DEFAULT_KEY',
'IOTA_DEFAULT_TRANSPORT'
];
const mqttVariables = [
'IOTA_MQTT_PROTOCOL',
Expand Down Expand Up @@ -228,11 +231,10 @@ function processEnvironmentVariables() {
config.mqtt.clientId = process.env.IOTA_MQTT_CLIENT_ID;
}

if (process.env.IOTA_MQTT_DISABLED && process.env.IOTA_MQTT_DISABLED.trim().toLowerCase() === 'true'){
if (process.env.IOTA_MQTT_DISABLED && process.env.IOTA_MQTT_DISABLED.trim().toLowerCase() === 'true') {
config.mqtt.disabled = true;
}


if (anyIsSet(amqpVariables)) {
config.amqp = config.amqp || {};
}
Expand Down Expand Up @@ -274,7 +276,7 @@ function processEnvironmentVariables() {
config.amqp.retryTime = process.env.IOTA_AMQP_RETRY_TIME;
}

if (process.env.IOTA_AMQP_DISABLED && process.env.IOTA_AMQP_DISABLED.trim().toLowerCase() === 'true'){
if (process.env.IOTA_AMQP_DISABLED && process.env.IOTA_AMQP_DISABLED.trim().toLowerCase() === 'true') {
config.amqp.disabled = true;
}

Expand Down
Loading