8000 blocking messenger consumer · symfony/symfony@a6dc921 · GitHub
[go: up one dir, main page]

Skip to content

Commit a6dc921

Browse files
committed
blocking messenger consumer
1 parent e579ac6 commit a6dc921

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Symfony/Component/Messenger/Worker.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ public function run(array $options = []): void
104104
if (!$receiver instanceof QueueBlockingReceiverInterface) {
105105
throw new RuntimeException(sprintf('Receiver for "%s" does not implement "%s".', $transportName, QueueBlockingReceiverInterface::class));
106106
}
107-
} else {
108-
if (!$receiver instanceof QueueReceiverInterface) {
109-
throw new RuntimeException(sprintf('Receiver for "%s" does not implement "%s".', $transportName, QueueReceiverInterface::class));
110-
}
107+
} elseif (!$receiver instanceof QueueReceiverInterface) {
108+
throw new RuntimeException(sprintf('Receiver for "%s" does not implement "%s".', $transportName, QueueReceiverInterface::class));
111109
}
112110
}
113111
}
@@ -130,10 +128,10 @@ public function run(array $options = []): void
130128
};
131129

132130
if ($queueNames) {
133-
/* @var QueueBlockingReceiverInterface $receiver */
131+
/** @var QueueBlockingReceiverInterface $receiver */
134132
$receiver->pullFromQueues($queueNames, $callback);
135133
} else {
136-
/* @var BlockingReceiverInterface $receiver */
134+
/** @var BlockingReceiverInterface $receiver */
137135
$receiver->pull($callback);
138136
}
139137
} else {

0 commit comments

Comments
 (0)
0