...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/integrity/volatile/eventhandler.php
- Класс: Bitrix\Crm\Integrity\Volatile\EventHandler
- Вызов: EventHandler::renewAutomaticDuplicateIndexAgents
protected function renewAutomaticDuplicateIndexAgents() { foreach ( AutosearchUserSettingsTable::query() ->where('STATUS_ID', AutoSearchUserSettings::STATUS_INDEX_REBUILDING) ->whereIn('ENTITY_TYPE_ID', $this->entityTypeIds) ->setSelect(['*']) ->fetchCollection() as $settings ) { $userId = $settings->getUserId(); $entityTypeId = $settings->getEntityTypeId(); $progressData = $settings->getProgressData(); $selectedTypeIds = $progressData['TYPE_IDS'] ?? []; if (!empty(array_intersect($this->volatileTypeIds, $selectedTypeIds))) { $res = CAgent::GetList( ['ID' => 'DESC'], [ 'MODULE_ID' => 'crm', 'NAME' => "%Bitrix\\Crm\\Agent\\Duplicate\\Automatic\\" . "RebuildUserDuplicateIndexAgent::run($entityTypeId, $userId);", ] ); if (is_object($res)) { while ($row = $res->Fetch()) { CAgent::Delete((int)$row['ID']); } } $settings->setNextExecTime((new DateTime())->add('20 minutes')); $settings->setStatusId(AutoSearchUserSettings::STATUS_NEW); $settings->save(); } } }