1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
pushdelayedsection.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Core\Queue\Processor;
4
5use Bitrix\Calendar\Core\Queue\Interfaces;
6use Bitrix\Calendar\Internals\PushTable;
7use Bitrix\Calendar\Sync\Builders\BuilderPushFromDM;
8use Bitrix\Calendar\Sync\Managers\PushManager;
9use Bitrix\Calendar\Sync;
10use Bitrix\Main\ArgumentException;
11use Bitrix\Main\ObjectPropertyException;
12use Bitrix\Main\SystemException;
13
15{
21 public function process(Interfaces\Message $message): string
22 {
23 $data = $message->getBody();
24
25 $sectionConnectionId = $data[Sync\Push\Dictionary::PUSH_TYPE['sectionConnection']] ?? null;
26 if (empty($sectionConnectionId))
27 {
28 return self::REJECT;
29 }
30
31 try
32 {
33 $push = PushTable::getById([
34 'ENTITY_TYPE' => PushManager::TYPE_SECTION_CONNECTION,
35 'ENTITY_ID' => $sectionConnectionId,
36 ])->fetchObject();
37 if ($push)
38 {
39 $result = (new PushManager())->handlePush(
40 $push->getChannelId(),
41 $push->getResourceId()
42 );
43 }
44
45 return self::ACK;
46 }
47 catch (\Exception $e)
48 {
49 return self::REJECT;
50 }
51 }
52}
process(Interfaces\Message $message)
Определения pushdelayedsection.php:21
$data['IS_AVAILABLE']
Определения .description.php:13
$result
Определения get_property_values.php:14
$message
Определения payment.php:8