RuleMaster::getMessages

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. RuleMaster
  4. getMessages
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/queue/rule/rulemaster.php
  • Класс: BitrixCalendarCoreQueueRuleRuleMaster
  • Вызов: RuleMaster::getMessages
private function getMessages(): Generator
{
	do
	{
		$messages = $this->getMessageMapper()->getMap(
			[
				'>ID' => $this->getLastProcessedId(),
			],
			self::PACK_SIZE,
			[
				'ID' => 'ASC',
			],
		);
		/** @var Message $message */
		foreach ($messages as $message)
		{
			yield $message;
			$this->setLastProcessedId($message->getId());
		}
	}

	while($messages->count());
}

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