icinga-powershell-framework/lib/core/framework/Clear-IcingaCheckSchedulerCheckData.psm1
2021-02-23 10:58:03 +01:00

28 lines
793 B
PowerShell

<#
.SYNOPSIS
Clear all cached values for all check commands executed by this thread.
This is mandatory as we might run into a memory leak otherwise!
.DESCRIPTION
Clear all cached values for all check commands executed by this thread.
This is mandatory as we might run into a memory leak otherwise!
.FUNCTIONALITY
Clear all cached values for all check commands executed by this thread.
This is mandatory as we might run into a memory leak otherwise!
.OUTPUTS
System.Object
.LINK
https://github.com/Icinga/icinga-powershell-framework
#>
function Clear-IcingaCheckSchedulerCheckData()
{
if ($null -eq $global:Icinga) {
return;
}
if ($global:Icinga.ContainsKey('CheckData') -eq $FALSE) {
return;
}
$global:Icinga.CheckData.Clear();
}