Skip to content

Commit e368b32

Browse files
authored
Merge pull request #236 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 8cda693 + 1bb11ed commit e368b32

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Modules/CIPPCore/Public/Entrypoints/Timer Functions/Start-DurableCleanup.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function Start-DurableCleanup {
1515

1616
[CmdletBinding(SupportsShouldProcess = $true)]
1717
param(
18-
[int]$MaxDuration = 3600
18+
[int]$MaxDuration = 86400
1919
)
2020

2121
$WarningPreference = 'SilentlyContinue'
@@ -49,6 +49,11 @@ function Start-DurableCleanup {
4949
if ($PSCmdlet.ShouldProcess($_.PartitionKey, 'Terminate Orchestrator')) {
5050
$Orchestrator = Get-CIPPAzDataTableEntity @Table -Filter "PartitionKey eq '$($Orchestrator.PartitionKey)'"
5151
$Orchestrator.RuntimeStatus = 'Failed'
52+
if ($Orchestrator.PSObject.Properties.Name -contains 'CustomStatus') {
53+
$Orchestrator.CustomStatus = "Terminated by Durable Cleanup - Exceeded max duration of $MaxDuration seconds"
54+
} else {
55+
$Orchestrator | Add-Member -MemberType NoteProperty -Name CustomStatus -Value "Terminated by Durable Cleanup - Exceeded max duration of $MaxDuration seconds"
56+
}
5257
Update-AzDataTableEntity @Table -Entity $Orchestrator
5358
$CleanupCount++
5459
}

version_latest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.5.2
1+
7.5.3

0 commit comments

Comments
 (0)