Метод cleanup
Сигнатура метода
public function cleanup(ManagedAgentResource $resource, ManagedResourceCleanupBudget $budget): ManagedResourceCleanupResult
Возвращает:
ManagedResourceCleanupResult
Описание
Removes one registered resource of this type, or confirms that it is already absent. The caller deletes the service row only after a complete result, so the row has to stay while the result is pending: it is the only proof of ownership the next pass is left with. An external module that is unavailable leaves the operation unfinished and is never read as a successful absence. The technical data of the resource are read through the closed schema of its type. A version the participant does not know gives a failed result and never an attempt to delete by unverified data.
Параметры
2| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$resource
|
ManagedAgentResource
|
—
|
—
|
$budget
|
ManagedResourceCleanupBudget
|
—
|
—
|
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulesbizproc/lib/Internal/AiAgent/Lifecycle/Cleanup/ManagedResourceCleanupInterface.php