EventsWithEntityAttendeesFind::sendBatchOfMessagesToQueue

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. EventsWithEntityAttendeesFind
  4. sendBatchOfMessagesToQueue
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/queue/processor/eventswithentityattendeesfind.php
  • Класс: BitrixCalendarCoreQueueProcessorEventsWithEntityAttendeesFind
  • Вызов: EventsWithEntityAttendeesFind::sendBatchOfMessagesToQueue
protected function sendBatchOfMessagesToQueue(array $events): void
{
	$messages = [];

	foreach ($events as $event)
	{
		if (!empty($event['ID']))
		{
			$messages[] = (new BitrixCalendarCoreQueueMessageMessage())
				->setBody([
					'eventId' => $event['ID'],
				])
				->setRoutingKey('calendar:update_event_attendees')
			;
		}
	}

	(new BitrixCalendarCoreQueueProducerProducer())->sendBatch($messages);
}

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