Метод completeReservations
Сигнатура метода
private function completeReservations(int $instanceId, ManagedResourceCleanupBudget $budget): ManagedResourceCleanupResult
Возвращает:
ManagedResourceCleanupResult
Описание
Completes the reservations of this instance with the ids of the bots that were actually created. A reserved code is registered before its bot exists, therefore nothing has to be adopted here: a live bot of the copy without a registration cannot happen, and an existing bot of the portal is not owned. The rows are walked by keyset inside one call and the walk starts over on the next pass, because the cursor of a pass outlives nothing. What makes repeated passes progress is the deletion instead: it drops the reservation of every bot it removed, so the next pass walks fewer rows. The reconciliation is bounded by the share of the budget of its own phase, hence it can never spend the rows that deletion needs.
Параметры
2| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$instanceId
|
int
|
—
|
—
|
$budget
|
ManagedResourceCleanupBudget
|
—
|
—
|
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulesbizproc/lib/Internal/AiAgent/Lifecycle/Cleanup/BotCleanup.php