Skip to content

Commit f299691

Browse files
committed
Reduce batch size from 1000 to 500 in orchestrator
Adjusted the batch processing loop in Start-AuditLogProcessingOrchestrator.ps1 to process 500 row IDs per batch instead of 1000. This change may help improve performance or avoid issues with large batch sizes.
1 parent 73d5ab2 commit f299691

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-AuditLogProcessingOrchestrator.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ function Start-AuditLogProcessingOrchestrator {
2828
$ProcessBatch = foreach ($TenantGroup in $TenantGroups) {
2929
$TenantFilter = $TenantGroup.Name
3030
$RowIds = @($TenantGroup.Group.RowKey)
31-
for ($i = 0; $i -lt $RowIds.Count; $i += 1000) {
32-
Write-Host "Processing $TenantFilter with $($RowIds.Count) row IDs. We're processing id $($RowIds[$i]) to $($RowIds[[Math]::Min($i + 999, $RowIds.Count - 1)])"
33-
$BatchRowIds = $RowIds[$i..([Math]::Min($i + 999, $RowIds.Count - 1))]
31+
for ($i = 0; $i -lt $RowIds.Count; $i += 500) {
32+
Write-Host "Processing $TenantFilter with $($RowIds.Count) row IDs. We're processing id $($RowIds[$i]) to $($RowIds[[Math]::Min($i + 499, $RowIds.Count - 1)])"
33+
$BatchRowIds = $RowIds[$i..([Math]::Min($i + 499, $RowIds.Count - 1))]
3434
[PSCustomObject]@{
3535
TenantFilter = $TenantFilter
3636
RowIds = $BatchRowIds

0 commit comments

Comments
 (0)