Метод rememberBotId

private

Сигнатура метода

private function rememberBotId(ManagedAgentResource $resource, array $botIds, ManagedResourceCleanupBudget $budget): ?ManagedResourceCleanupResult

Возвращает: ?ManagedResourceCleanupResult

Описание

Pins the id of the bot the reserved code resolves to, or null when there is nothing to store. The first observation wins and a stored id is never replaced: it is what proves that the bot under the code is still ours, and an id rewritten to whatever the code holds now would prove nothing at all. The row is written directly and idempotently: the creation barrier of the registry refuses a registration while the instance is being deleted, and this is where the reconciliation runs. The bots of the whole portion are resolved at once, and every reservation of it still costs the one row of the budget its own lookup used to cost: what the portion changes is the number of queries and not the amount of work a pass is allowed to do.

Параметры

3
Имя Тип По умолчанию Флаги
$resource ManagedAgentResource —
—
$botIds array —
—
$budget ManagedResourceCleanupBudget —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulesbizproc/lib/Internal/AiAgent/Lifecycle/Cleanup/BotCleanup.php
Расположение метода в файле
Строки 350–393

Исходный код

PHP