Lighter::execute

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Lighter
  4. execute
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/counter/lighter/lighter.php
  • Класс: Bitrix\Crm\Counter\Lighter\Lighter
  • Вызов: Lighter::execute
public function execute(): void
{
	$activityIds = $this->queries->queryActivityIdsToLightCounters();

	if (empty($activityIds))
	{
		return;
	}

	$activities = $this->queries->queryActivitiesByIds($activityIds);

	$bindingsGroupedByTypeId = $this->queries->queryGroupedBindings($activityIds);

	$entitiesInfo = $this->queries->queryEntitiesData($bindingsGroupedByTypeId);

	$codeGeneratorParams = $this->getCodeGeneratorParams($entitiesInfo, $activities);

	$resetData = $this->codesToResetGenerator($codeGeneratorParams);

	foreach ($resetData as $data)
	{
		[$codes, $responsibleIds] = $data;

		// reset counters also will send push notification to update UI counters.
		$this->resetWrapper->reset($codes, $responsibleIds);
		$this->resetWrapper->resetExcludeUsersCounters($codes, $responsibleIds);
	}

	$this->pushNotification->notifyTimeline($activities);
	$this->pushNotification->notifyKanban($entitiesInfo);
	$this->markAsNotified($activityIds);
}

Добавить комментарий