Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
consumerclientexample.php
1
<?php
2
3
namespace
Bitrix\Calendar\Core\Queue\Examples
;
4
5
use
Bitrix\Calendar\Core\Queue\Consumer\Simple
;
6
use
Bitrix\Calendar\Core\Queue\Interfaces
;
7
use
Bitrix\Calendar\Core\Queue\Queue\QueueFactory
;
8
use
Bitrix\Calendar\Core\Queue\Queue\QueueRegistry
;
9
use Bitrix\Calendar\Core\Queue;
10
use
Bitrix
;
11
12
class
ConsumerClientExample
extends
Queue\Agent\BaseAgent
13
{
14
protected
function
getConsumer
(): Interfaces\
Consumer
15
{
16
$queue = (
new
QueueFactory
())->getById(QueueRegistry::QUEUE_LIST[
'Example'
]);
17
$consumer =
new
Simple
($queue);
18
$consumer->setPackSize(100);
19
return
$consumer;
20
}
21
22
protected
function
getProcessor
(): Interfaces\
Processor
23
{
24
return
new
ProcessorExample
();
25
}
26
}
Bitrix\Calendar\Core\Queue\Agent\BaseAgent
Definition
baseagent.php:11
Bitrix\Calendar\Core\Queue\Consumer\Simple
Definition
simple.php:13
Bitrix\Calendar\Core\Queue\Examples\ConsumerClientExample
Definition
consumerclientexample.php:13
Bitrix\Calendar\Core\Queue\Examples\ConsumerClientExample\getProcessor
getProcessor()
Definition
consumerclientexample.php:22
Bitrix\Calendar\Core\Queue\Examples\ConsumerClientExample\getConsumer
getConsumer()
Definition
consumerclientexample.php:14
Bitrix\Calendar\Core\Queue\Examples\ProcessorExample
Definition
processorexample.php:11
Bitrix\Calendar\Core\Queue\Queue\QueueFactory
Definition
queuefactory.php:6
Bitrix\Calendar\Core\Queue\Queue\QueueRegistry
Definition
queueregistry.php:7
Bitrix\Calendar\Core\Queue\Interfaces\Consumer
Definition
consumer.php:6
Bitrix\Calendar\Core\Queue\Interfaces\Processor
Definition
processor.php:5
Bitrix\Calendar\Core\Queue\Examples
Definition
consumerclientexample.php:3
Bitrix\Calendar\Core\Queue\Interfaces
Definition
consumer.php:3
Bitrix
modules
calendar
lib
core
queue
examples
consumerclientexample.php
Создано системой
1.10.0