From 8f8869c4b7675f7046077303fb7abe61e8acee72 Mon Sep 17 00:00:00 2001 From: Andreas Lindemark <andreas.lindemark@liu.se> Date: Mon, 10 Mar 2025 19:44:27 +0100 Subject: [PATCH] Removed the EnableRandomDelay functionallity --- Windows/Chocolatey/ChocolateyUpgrade.ps1 | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Windows/Chocolatey/ChocolateyUpgrade.ps1 b/Windows/Chocolatey/ChocolateyUpgrade.ps1 index c46f555..40cd9dc 100644 --- a/Windows/Chocolatey/ChocolateyUpgrade.ps1 +++ b/Windows/Chocolatey/ChocolateyUpgrade.ps1 @@ -2,11 +2,6 @@ Upgrade programs with Chocolatey by running "choco upgrade -y all" at computer startup and nightly ======================================================================================================#> -<#== Set parameter at start ==#> -param ( - [bool]$EnableRandomDelay = $false -) - <#== Function to remove old log files ==#> function Remove-OldLogFiles { param ( @@ -57,13 +52,6 @@ $busyFlagContent = "Script: $scriptName`nStart Time: $startTime" New-Item -Path $busyFlagPath -ItemType File -Force > $null Set-Content -Path $busyFlagPath -Value $busyFlagContent > $null -<#== Apply random delay if enabled ==#> -if ($EnableRandomDelay) { - $randomDelay = Get-Random -Minimum 0 -Maximum 300 # Random delay between 0 and 300 seconds (5 minutes) - Write-Host "Applying random delay of $randomDelay seconds..." - Start-Sleep -Seconds $randomDelay -} - <#== Upgrade all Chocolatey packages ==#> Write-Host "Starting Chocolatey upgrade..." powershell.exe choco upgrade -y all -- GitLab