Skip to content

Commit 08a97cc

Browse files
authored
Merge pull request #186 from acep-uaf/nicole/connection_typo
Fix max_connection_retries typo (missing n)
2 parents 7b428bd + c5bc801 commit 08a97cc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cli_meter/config/config.yml.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ download_directory: ""
1212

1313
# bytes/s, 0 means unlimited, Suffixes are supported, e.g. 100K means 102400.
1414
bandwidth_limit: 0
15-
# If empty, the default to 1.
16-
max_conection_retries:
15+
16+
max_connection_retries: 1
1717
max_age_days:
1818

1919
# Require default credentials for FTP server

cli_meter/data_pipeline.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ data_type=$(yq '.data_type' "$config_path")
4040
download_dir=$(yq '.download_directory' "$config_path")
4141
bandwidth_limit=$(yq '.bandwidth_limit' "$config_path")
4242
max_age_days=$(yq '.max_age_days' "$config_path")
43-
max_conection_retries=$(yq '.max_conection_retries' "$config_path")
43+
max_connection_retries=$(yq '.max_connection_retries' "$config_path")
4444
default_username=$(yq '.credentials.username' "$config_path")
4545
default_password=$(yq '.credentials.password' "$config_path")
4646
num_meters=$(yq '.meters | length' "$config_path")
@@ -53,8 +53,8 @@ num_meters=$(yq '.meters | length' "$config_path")
5353
[[ -z "$default_password" || "$default_password" == "null" ]] && failure $STREAMS_INVALID_CONFIG "Default password cannot be null or empty."
5454
[[ -z "$bandwidth_limit" || "$bandwidth_limit" == "null" ]] && failure $STREAMS_INVALID_CONFIG "Bandwidth limit cannot be null or empty."
5555
[[ -z "$num_meters" || "$num_meters" -eq 0 ]] && failure $STREAMS_INVALID_CONFIG "Must have at least 1 meter in the config file."
56-
[[ "$max_conection_retries" =~ ^([1-9]|10)$ ]] || failure $STREAMS_INVALID_CONFIG "Max connection retries must be an integer between 1 and 10: '$max_conection_retries'"
57-
[[ -z "$max_conection_retries" || "$max_conection_retries" == "null" ]] && max_conection_retries=1
56+
[[ "$max_connection_retries" =~ ^([1-9]|10)$ ]] || failure $STREAMS_INVALID_CONFIG "Max connection retries must be an integer between 1 and 10: '$max_connection_retries'"
57+
[[ -z "$max_connection_retries" || "$max_connection_retries" == "null" ]] && max_connection_retries=1
5858

5959
# if max_age_days is set make sure max_age_days is a number
6060
if [[ ! -z "$max_age_days" && "$max_age_days" != "null" ]]; then
@@ -84,7 +84,7 @@ for ((i = 0; i < num_meters; i++)); do
8484
export USERNAME=${meter_username:-$default_username}
8585
export PASSWORD=${meter_password:-$default_password}
8686

87-
"$current_dir/meters/$meter_type/download.sh" "$meter_ip" "$output_dir" "$meter_id" "$meter_type" "$bandwidth_limit" "$data_type" "$location" "$max_age_days" "$max_conection_retries"
87+
"$current_dir/meters/$meter_type/download.sh" "$meter_ip" "$output_dir" "$meter_id" "$meter_type" "$bandwidth_limit" "$data_type" "$location" "$max_age_days" "$max_connection_retries"
8888

8989
download_return_code=$?
9090

0 commit comments

Comments
 (0)