|
|
|
@ -980,8 +980,10 @@ if ($mirrors_response.StatusCode -eq 200) {
|
|
|
|
|
foreach ($key in $dict_mirrors.Keys) { |
|
|
|
|
$list_mirror_dicts += $($dict_mirrors[$key]) |
|
|
|
|
} |
|
|
|
|
$sorted_mirror_dicts = $list_mirror_dicts | Sort-Object -Property Latency |
|
|
|
|
Write-Host "Sorted by latency: $($sorted_mirror_dicts | Format-Table -AutoSize | Out-String)" |
|
|
|
|
#need to ensure latency cast to integer (on powershell 5 at least) |
|
|
|
|
$sorted_mirror_dicts = $list_mirror_dicts | Sort-Object -Property { [int]$_.latency } |
|
|
|
|
#Write-Host "Sorted by latency: $($sorted_mirror_dicts | Format-Table -AutoSize | Out-String)" |
|
|
|
|
Write-Host "Sorted by latency: $($sorted_mirror_dicts | Format-List -AutoSize | Out-String)" |
|
|
|
|
$automation_name = "punkshell+julian@precisium.com.au_target_by_latency" |
|
|
|
|
|
|
|
|
|
foreach ($hostinfo in $sorted_mirror_dicts) { |
|
|
|
|