Skip to content

Commit

Permalink
Calling Split-Array only if TotalJobCount more than 1 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
raandree authored Mar 20, 2023
1 parent 2cee34b commit fade0ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Increase build speed of root configuration by only importing required Composites/Resources
- Added ''UseEnvironment'' parameter to cater for RSOP for identical node names in different environments
- Adding Home.md to wikiSource and correct casing.
- Redesign of the function Split-Array. Most of the time it was not working as expected, especially when requesting larger ChunkCounts (see AutomatedLab/AutomatedLab.Common/#118)
- Redesign of the function Split-Array. Most of the time it was not working as expected, especially when requesting larger ChunkCounts (see AutomatedLab/AutomatedLab.Common/#118).
- Improved error handling when compiling MOF files.

### Fixed
Expand Down
7 changes: 5 additions & 2 deletions source/Public/Get-FilteredConfigurationData.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ function Get-FilteredConfigurationData
}

$CurrentJobNumber--
$allDatumNodes = Split-Array -List $allDatumNodes -ChunkCount $TotalJobCount
$allDatumNodes = $allDatumNodes[$CurrentJobNumber]
if ($TotalJobCount -gt 1)
{
$allDatumNodes = Split-Array -List $allDatumNodes -ChunkCount $TotalJobCount
}
$allDatumNodes = @($allDatumNodes[$CurrentJobNumber])

return @{
AllNodes = $allDatumNodes
Expand Down

0 comments on commit fade0ef

Please sign in to comment.