mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
18 lines
391 B
PowerShell
18 lines
391 B
PowerShell
|
|
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)
|
||
|
|
);
|
||
|
|
}
|