- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/update/fulltasksindexer.php
- Класс: BitrixTasksUpdateFullTasksIndexer
- Вызов: FullTasksIndexer::handleTasks
static function handleTasks($time, $params)
{
$found = false;
$tasksRes = TaskTable::getList([
'select' => ['ID'],
'filter' => [
'>ID' => $params["last_task_id"],
' $params["last_task_to_index"] + 1,
],
'order' => ['ID' => 'ASC'],
'offset' => 0,
'limit' => 100
]);
while ($task = $tasksRes->fetch())
{
$taskId = $task['ID'];
SearchIndex::setTaskSearchIndex($taskId, []);
$params["number"]++;
$params["last_task_id"] = (int)$taskId;
$found = true;
if (time() - $time > 3)
{
break;
}
}
return [
'FOUND' => $found,
'PARAMS' => $params
];
}