mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
13 lines
399 B
PowerShell
13 lines
399 B
PowerShell
function Get-IcingaNextRESTApiThreadId()
|
|
{
|
|
[int]$ConcurrentThreads = $Global:Icinga.Public.Daemons.RESTApi.TotalThreads - 1;
|
|
[int]$LastThreadId = $Global:Icinga.Public.Daemons.RESTApi.LastThreadId + 1;
|
|
|
|
if ($LastThreadId -gt $ConcurrentThreads) {
|
|
$LastThreadId = 0;
|
|
}
|
|
|
|
$Global:Icinga.Public.Daemons.RESTApi.LastThreadId = $LastThreadId;
|
|
|
|
return $LastThreadId;
|
|
}
|