• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/posting/segmentdatabuilder.php
  • Класс: BitrixSenderPostingSegmentDataBuilder
  • Вызов: SegmentDataBuilder::checkBuild
static function checkBuild(): void
{
	$groupStateList = GroupStateTable::getList([
		'select' => [
			'GROUP_ID',
			'FILTER_ID',
			'ENDPOINT',
		],
		'filter' => [
			'!@STATE' => [
					GroupStateTable::STATES['COMPLETED'],
					GroupStateTable::STATES['HALTED'],
				]
		],
	]);

	while ($groupState = $groupStateList->fetch())
	{
		$segmentBuilder = new SegmentDataBuilder(
			(int)$groupState['GROUP_ID'],
			$groupState['FILTER_ID'],
			json_decode($groupState['ENDPOINT'], true)
		);

		$segmentBuilder->buildData();
		self::checkIsSegmentPrepared((int)$groupState['GROUP_ID']);
	}
}