From 10892f56efd5558b5bf28d89a70990259d2e7449 Mon Sep 17 00:00:00 2001 From: Vittorio Parrella Date: Mon, 26 Aug 2024 00:01:11 +0200 Subject: [PATCH] fix bad exit errorcode --- .github/workflows/run-performance.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-performance.yml b/.github/workflows/run-performance.yml index 3ffc125..e9c5c2f 100644 --- a/.github/workflows/run-performance.yml +++ b/.github/workflows/run-performance.yml @@ -190,21 +190,22 @@ jobs: run: | $Stoploop = $false [ int ]$MaxRetries = "60" + [ int ]$Retrycount = $MaxRetries do { try { $id = Get-Process qpep -ErrorAction Stop | select -expand id - Write-Host "QPep client still active with pid ${id}, wait 1sec..." - $Retrycount = $Retrycount - 1 + Write-Host "QPep client still active with pid ${id}, wait 1sec... (Retries: ${Retrycount})" Start-Sleep -Seconds 1 + $Retrycount = $Retrycount - 1 } catch { $Stoploop = $true Write-Host "QPep client stopped" } - + if ($Retrycount -lt 0){ - Write-Error "Could not get stop client after $MaxRetries retries, forcing stop." + Write-Host "Could not get stop client after $MaxRetries retries, forcing stop." $Stoploop = $true Get-Process qpep | Stop-Process