PushDelayedConnection::process

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. PushDelayedConnection
  4. process
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/queue/processor/pushdelayedconnection.php
  • Класс: BitrixCalendarCoreQueueProcessorPushDelayedConnection
  • Вызов: PushDelayedConnection::process
public function process(InterfacesMessage $message): string
{
	$data = $message->getBody();

	$connectionId = $data[SyncPushDictionary::PUSH_TYPE['connection']] ?? null;

	if (empty($connectionId))
	{
		return self::REJECT;
	}

	try
	{
		$push = PushTable::getById([
			'ENTITY_TYPE' => PushManager::TYPE_CONNECTION,
			'ENTITY_ID' => $connectionId,
		])->fetchObject();
		if ($push)
		{
			$result = (new PushManager())->handlePush(
				$push->getChannelId(),
				$push->getResourceId()
			);
		}

		return self::ACK;
	}
	catch (Exception $e)
	{
		return self::REJECT;
	}
}

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