Метод reconcile

public

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

public function reconcile(ManagedAgentInstance $instance, ManagedResourceCleanupBudget $budget): ManagedResourceCleanupResult

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

Описание

Reconciles the registered resources of this type with the actual tables of the instance before any of them is cleaned up, and again under the closed creation barrier before the service link is removed. The reconciliation closes the window between the creation of a resource and its registration: a live resource of the instance found without a registration is registered here, and a registration whose ownership no longer holds is dropped. A complete result therefore states that the registry of this type describes the actual state, not that the type is already empty: the registered rows are cleaned up by {@see self::cleanup()} afterwards. A reconciliation walks what is still live, so it may not spend the budget the deletion of the same pass needs: it runs inside the reconciliation phase of the budget and reads its live resources in bounded portions. A portion it did not reach is a pending result and is continued by the next pass, which meets fewer resources because this one removed some of them. The caller does not stop at a pending reconciliation either - it cleans up the rows that are already registered and keeps the outcome of the type pending, hence a removal still never reports a final success while a resource is left.

Параметры

2
Имя Тип По умолчанию Флаги
$instance ManagedAgentInstance —
—
$budget ManagedResourceCleanupBudget —
—

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

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

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

Исходный код

PHP