forked from KelvinTegelaar/CIPP-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'KelvinTegelaar:master' into master
- Loading branch information
Showing
48 changed files
with
200 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,40 @@ | ||
param($Context) | ||
|
||
try { | ||
try { | ||
|
||
$DurableRetryOptions = @{ | ||
FirstRetryInterval = (New-TimeSpan -Seconds 5) | ||
MaxNumberOfAttempts = 3 | ||
BackoffCoefficient = 2 | ||
} | ||
$RetryOptions = New-DurableRetryOptions @DurableRetryOptions | ||
$DurableRetryOptions = @{ | ||
FirstRetryInterval = (New-TimeSpan -Seconds 5) | ||
MaxNumberOfAttempts = 1 | ||
BackoffCoefficient = 2 | ||
} | ||
$RetryOptions = New-DurableRetryOptions @DurableRetryOptions | ||
|
||
# Sync tenants | ||
try { | ||
Invoke-ActivityFunction -FunctionName 'DomainAnalyser_GetTenantDomains' -Input 'Tenants' | ||
} | ||
catch { Write-Host "EXCEPTION: TenantDomains $($_.Exception.Message)" } | ||
# Sync tenants | ||
try { | ||
Invoke-ActivityFunction -FunctionName 'DomainAnalyser_GetTenantDomains' -Input 'Tenants' | ||
} catch { Write-Host "EXCEPTION: TenantDomains $($_.Exception.Message)" } | ||
|
||
# Get list of all domains to process | ||
$Batch = Invoke-ActivityFunction -FunctionName 'Activity_GetAllTableRows' -Input 'Domains' | ||
|
||
$ParallelTasks = foreach ($Item in $Batch) { | ||
Invoke-DurableActivity -FunctionName 'DomainAnalyser_All' -Input $item -NoWait -RetryOptions $RetryOptions | ||
} | ||
|
||
# Collect activity function results and send to database | ||
$TableParams = Get-CippTable -tablename 'Domains' | ||
$TableParams.Entity = Wait-ActivityFunction -Task $ParallelTasks | ||
$TableParams.Force = $true | ||
$TableParams = $TableParams | ConvertTo-Json -Compress | ||
# Get list of all domains to process | ||
$Batch = Invoke-ActivityFunction -FunctionName 'Activity_GetAllTableRows' -Input 'Domains' | ||
|
||
try { | ||
Invoke-ActivityFunction -FunctionName 'Activity_AddOrUpdateTableRows' -Input $TableParams | ||
} | ||
catch { | ||
Write-Host "Orchestrator exception UpdateDomains $($_.Exception.Message)" | ||
} | ||
} | ||
catch { | ||
Write-LogMessage -API 'DomainAnalyser' -message "Domain Analyser Orchestrator Error $($_.Exception.Message)" -sev info | ||
#Write-Host $_.Exception | ConvertTo-Json | ||
} | ||
finally { | ||
Write-LogMessage -API 'DomainAnalyser' -message 'Domain Analyser has Finished' -sev Info | ||
$ParallelTasks = foreach ($Item in $Batch) { | ||
Invoke-DurableActivity -FunctionName 'DomainAnalyser_All' -Input $item -NoWait -RetryOptions $RetryOptions | ||
} | ||
|
||
# Collect activity function results and send to database | ||
$TableParams = Get-CippTable -tablename 'Domains' | ||
$TableParams.Entity = Wait-ActivityFunction -Task $ParallelTasks | ||
$TableParams.Force = $true | ||
$TableParams = $TableParams | ConvertTo-Json -Compress | ||
|
||
try { | ||
Invoke-ActivityFunction -FunctionName 'Activity_AddOrUpdateTableRows' -Input $TableParams | ||
} catch { | ||
Write-Host "Orchestrator exception UpdateDomains $($_.Exception.Message)" | ||
} | ||
} catch { | ||
Write-LogMessage -API 'DomainAnalyser' -message "Domain Analyser Orchestrator Error $($_.Exception.Message)" -sev info | ||
#Write-Host $_.Exception | ConvertTo-Json | ||
} finally { | ||
Write-LogMessage -API 'DomainAnalyser' -message 'Domain Analyser has Finished' -sev Info | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-21.6 KB
Modules/AzBobbyTables/3.1.0/dependencies/Microsoft.Bcl.AsyncInterfaces.dll
Binary file not shown.
Binary file removed
BIN
-407 KB
Modules/AzBobbyTables/3.1.0/dependencies/Microsoft.VisualStudio.Threading.dll
Binary file not shown.
Binary file removed
BIN
-32.9 KB
Modules/AzBobbyTables/3.1.0/dependencies/Microsoft.VisualStudio.Validation.dll
Binary file not shown.
Binary file removed
BIN
-48.4 KB
Modules/AzBobbyTables/3.1.0/dependencies/System.Diagnostics.DiagnosticSource.dll
Binary file not shown.
Binary file removed
BIN
-16.6 KB
Modules/AzBobbyTables/3.1.0/dependencies/System.Runtime.CompilerServices.Unsafe.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Changelog for the module | ||
|
||
The format is based on and uses the types of changes according to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Added | ||
|
||
- Added Sampler ([#48](https://github.com/PalmEmanuel/AzBobbyTables/issues/48)). | ||
- Added support for user-assigned managed identities ([#54](https://github.com/PalmEmanuel/AzBobbyTables/issues/54)). | ||
|
||
## [3.1.2] - 2024-01-05 | ||
|
||
### Added | ||
|
||
- Help documentation for a DateTime problem caused by the SDK (#43). | ||
|
||
### Fixed | ||
|
||
### Changed | ||
|
||
### Removed | ||
|
||
## 3.1.1 - 2023-05-03 | ||
|
||
[Unreleased]: https://github.com/PalmEmanuel/AzBobbyTables/compare/v3.1.2...HEAD | ||
|
||
[3.1.2]: https://github.com/PalmEmanuel/AzBobbyTables/compare/d854153aca6c5cce35a123deb86653a0d3289b07...v3.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Emanuel Palm | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+26.1 KB
Modules/AzBobbyTables/3.1.3/dependencies/Microsoft.Bcl.AsyncInterfaces.dll
Binary file not shown.
Binary file added
BIN
+423 KB
Modules/AzBobbyTables/3.1.3/dependencies/Microsoft.VisualStudio.Threading.dll
Binary file not shown.
Binary file added
BIN
+37 KB
Modules/AzBobbyTables/3.1.3/dependencies/Microsoft.VisualStudio.Validation.dll
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added
BIN
+151 KB
Modules/AzBobbyTables/3.1.3/dependencies/System.Diagnostics.DiagnosticSource.dll
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added
BIN
+17.6 KB
Modules/AzBobbyTables/3.1.3/dependencies/System.Runtime.CompilerServices.Unsafe.dll
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.