mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Feat: Add configurable thread limit for parallel operations
Adds a "Threads" setting to the UI, allowing users to control the throttle limit for parallel tasks like driver and application processing. This introduces a new textbox in the build options and updates the parallel processing function to use this configurable value instead of a hardcoded one. Input validation is also added to ensure the threads value is a valid integer and is at least 1. The new setting is integrated into the configuration save/load functionality.
This commit is contained in:
@@ -633,7 +633,8 @@ function Invoke-DownloadSelectedDrivers {
|
||||
-CompletedStatusText 'Completed' `
|
||||
-ErrorStatusPrefix 'Error: ' `
|
||||
-WindowObject $State.Window `
|
||||
-MainThreadLogPath $State.LogFilePath
|
||||
-MainThreadLogPath $State.LogFilePath `
|
||||
-ThrottleLimit $State.Controls.txtThreads.Text
|
||||
|
||||
$overallSuccess = $true
|
||||
$successfullyDownloaded = [System.Collections.Generic.List[PSCustomObject]]::new()
|
||||
@@ -670,10 +671,10 @@ function Invoke-DownloadSelectedDrivers {
|
||||
$make = $makeLookup[$modelName]
|
||||
if ($make) {
|
||||
$successfullyDownloaded.Add([PSCustomObject]@{
|
||||
Make = $make
|
||||
Model = $modelName
|
||||
DriverPath = $driverPath
|
||||
})
|
||||
Make = $make
|
||||
Model = $modelName
|
||||
DriverPath = $driverPath
|
||||
})
|
||||
}
|
||||
else {
|
||||
WriteLog "Warning: Could not find 'Make' for successful download of model '$modelName'. Skipping from DriverMapping.json."
|
||||
@@ -722,7 +723,7 @@ function Invoke-DownloadSelectedDrivers {
|
||||
}
|
||||
'HP' {
|
||||
$modelObject = @{
|
||||
Name = $driverItem.Model
|
||||
Name = $driverItem.Model
|
||||
}
|
||||
}
|
||||
'Lenovo' {
|
||||
|
||||
Reference in New Issue
Block a user