Skip to content

Commit f4cbdc3

Browse files
committed
adjust durable cleanup times
1 parent e1df19f commit f4cbdc3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 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,7 @@ 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+
$Orchestrator.CustomStatus = "Terminated by Durable Cleanup - Exceeded max duration of $MaxDuration seconds"
5253
Update-AzDataTableEntity @Table -Entity $Orchestrator
5354
$CleanupCount++
5455
}

0 commit comments

Comments
 (0)