• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/agent/duplicate/volatile/indexrebuild.php
  • Класс: Bitrix\Crm\Agent\Duplicate\Volatile\IndexRebuild
  • Вызов: IndexRebuild::notifyPercentage
protected function notifyPercentage(int $userId, int $percentage): void
{
	$message = '';

	if ($percentage >= static::PERCENT_HALF && $percentage < static::PERCENT_ALMOST)
	{
		$message = $this->getNotifyMessage(static::PERCENT_HALF);
	}
	else if ($percentage >= static::PERCENT_ALMOST && $percentage < static::PERCENT_FULL)
	{
		$message = $this->getNotifyMessage(static::PERCENT_ALMOST);
	}
	else if ($percentage === static::PERCENT_FULL)
	{
		$message = $this->getNotifyMessage(static::PERCENT_FULL);
	}

	if ($message !== '')
	{
		Notification::create()
			->withMessage($message)
			->toList([$userId])
			->send();
	}
}