Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
queueregistry.php
1<?php
2
4
5
7{
8 public const QUEUE_LIST = [
9 'EventDelayedSync' => 1,
10 'UpdateDepartmentStructure' => 2,
11 'UpdateSocialGroupStructure' => 3,
12 'DelayedSyncSection' => 4,
13 'DelayedSyncConnection' => 5,
14 'EventsWithEntityAttendeesFind' => 6,
15 'EventAttendeesUpdate' => 7,
16 'SendingEmailNotification' => 8,
17 'Example' => 99999,
18 ];
19
20 public const ROUTING_TO_QUEUES = [
21 'calendar:update_meeting_status' => [
22 'EventDelayedSync'
23 ],
24 'calendar:find_events_with_entity_attendees' =>[
25 'EventsWithEntityAttendeesFind'
26 ],
27 'calendar:update_event_attendees' => [
28 'EventAttendeesUpdate'
29 ],
30 'calendar:sending_email_notification' => [
31 'SendingEmailNotification'
32 ],
33 ];
34
40 public static function getNameById(int $id): ?string
41 {
42 if ($key = array_search($id, self::QUEUE_LIST))
43 {
44 return $key;
45 }
46
47 return null;
48 }
49
55 public static function getIdByName(string $name): ?int
56 {
57 return self::QUEUE_LIST[$name] ?? null;
58 }
59}