icinga-powershell-framework/lib/core/thread/Add-IcingaThreadPool.psm1

18 lines
391 B
PowerShell
Raw Normal View History

2021-12-09 11:42:06 -05:00
function Add-IcingaThreadPool()
{
param (
[string]$Name = '',
[int]$MinInstances = 1,
[int]$MaxInstances = 5
);
if ($Global:Icinga.Public.ThreadPools.ContainsKey($Name)) {
return;
}
$Global:Icinga.Public.ThreadPools.Add(
$Name,
(New-IcingaThreadPool -MinInstances $MinInstances -MaxInstances $MaxInstances)
);
}