Skip to content

Commit

Permalink
Merge pull request #851 from telefonicaid/task/print_value_missed_env…
Browse files Browse the repository at this point in the history
…_vars

just print values for that env vars
  • Loading branch information
fgalan authored Jan 17, 2025
2 parents 188b127 + 05101be commit fa0614f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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
9 changes: 6 additions & 3 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 @@ -229,7 +232,7 @@ 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;
}

Expand Down Expand Up @@ -274,7 +277,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

0 comments on commit fa0614f

Please sign in to comment.