Skip to content

Commit 8084b83

Browse files
committed
MCP-771: [MCP-608] Multiple consumers prototype development
1 parent 18c091d commit 8084b83

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

app/code/Magento/MessageQueue/Console/StartConsumerCommand.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ class StartConsumerCommand extends Command
4343
private $lockManager;
4444

4545
/**
46-
* StartConsumerCommand constructor.
47-
* {@inheritdoc}
48-
*
4946
* @param \Magento\Framework\App\State $appState
5047
* @param ConsumerFactory $consumerFactory
5148
* @param string $name
@@ -166,14 +163,15 @@ protected function configure()
166163
167164
To do not run multiple copies of one consumer simultaneously:
168165
169-
<comment>%command.full_name% someConsumer --single-thread'</comment>
166+
<comment>%command.full_name% someConsumer --single-thread</comment>
170167
171168
To save PID enter path (This option is deprecated, use --single-thread instead):
172169
173170
<comment>%command.full_name% someConsumer --pid-file-path='/var/someConsumer.pid'</comment>
171+
174172
To define the number of processes per consumer:
175173
176-
<comment>%command.full_name% someConsumer --multi-process'</comment>
174+
<comment>%command.full_name% someConsumer --multi-process</comment>
177175
HELP
178176
);
179177
parent::configure();

app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ class ConsumersRunner
6060
private $logger;
6161

6262
/**
63-
* Lock Manager
64-
*
6563
* @var LockManagerInterface
6664
*/
6765
private $lockManager;
@@ -139,7 +137,8 @@ public function run()
139137
];
140138

141139
if ($maxMessages) {
142-
$arguments[] = '--max-messages=' . min($consumer->getMaxMessages() ?? $maxMessages, $maxMessages);
140+
$arguments[] =
141+
'--max-messages=' . min($consumer->getMaxMessages() ?? $maxMessages, $maxMessages);
143142
}
144143

145144
$command = $php . ' ' . BP . '/bin/magento queue:consumers:start %s %s'

0 commit comments

Comments
 (0)