Skip to content

Commit 06c2f46

Browse files
committed
remove sync rate limit
1 parent 202554e commit 06c2f46

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

Modules/CippExtensions/Public/NinjaOne/Invoke-NinjaOneTenantSync.ps1

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,21 @@ function Invoke-NinjaOneTenantSync {
77
$StartQueueTime = Get-Date
88
Write-Information "$(Get-Date) - Starting NinjaOne Sync"
99

10-
# Stagger start
11-
# Check Global Rate Limiting
12-
$CurrentMap = Get-ExtensionRateLimit -ExtensionName 'NinjaOne' -ExtensionPartitionKey 'NinjaOneMapping' -RateLimit 5 -WaitTime 10
10+
$MappingTable = Get-CIPPTable -TableName CippMapping
11+
$CurrentMap = (Get-CIPPAzDataTableEntity @MappingTable -Filter "PartitionKey eq '$ExtensionPartitionKey'")
12+
$CurrentMap | ForEach-Object {
13+
if ($Null -ne $_.lastEndTime -and $_.lastEndTime -ne '') {
14+
$_.lastEndTime = (Get-Date($_.lastEndTime))
15+
} else {
16+
$_ | Add-Member -NotePropertyName lastEndTime -NotePropertyValue $Null -Force
17+
}
18+
19+
if ($Null -ne $_.lastStartTime -and $_.lastStartTime -ne '') {
20+
$_.lastStartTime = (Get-Date($_.lastStartTime))
21+
} else {
22+
$_ | Add-Member -NotePropertyName lastStartTime -NotePropertyValue $Null -Force
23+
}
24+
}
1325

1426
$StartTime = Get-Date
1527

0 commit comments

Comments
 (0)