Skip to content

Commit f967db4

Browse files
author
Sean
committed
update send messages to degrade how often messages are sent over time.
1 parent 8f39518 commit f967db4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

psPodTester/public/Start-LogMessages.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ function Start-LogMessages
2525
$msg = '{0} {1}: {2} {3}.' -f $(Get-Date -Format s),$MessagePrefix,'Message #',$number
2626
$msg | Out-File $filePath -Append
2727
if ( $EnableConsoleLogs ) { Write-Host $msg }
28-
Start-Sleep -Seconds 15
28+
$waitTime = $( ([int]$number -le 120) ? 15 : (([int]$number -le 150) ? 60 : 900) )
29+
Start-Sleep -Seconds $waitTime
2930
}
3031
}
3132
Start-Process pwsh -ArgumentList "-command (Invoke-Command -ScriptBlock {$cmd} -ArgumentList $p,$f,$c)"

0 commit comments

Comments
 (0)