Skip to content

Commit 3083b04

Browse files
author
Daniel Fly
committed
Added missing connectionName
1 parent 543248a commit 3083b04

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/VladimirYuldashev/LaravelQueueRabbitMQ/Queue/Jobs/RabbitMQJob.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,22 @@ class RabbitMQJob extends Job implements JobContract
3535
* @param \PhpAmqpLib\Channel\AMQPChannel $channel
3636
* @param string $queue
3737
* @param \PhpAmqpLib\Message\AMQPMessage $message
38+
* @param string $connectionName
3839
*/
3940
public function __construct(
4041
Container $container,
4142
RabbitMQQueue $connection,
4243
AMQPChannel $channel,
4344
$queue,
44-
AMQPMessage $message
45+
AMQPMessage $message,
46+
$connectionName
4547
) {
4648
$this->container = $container;
4749
$this->connection = $connection;
4850
$this->channel = $channel;
4951
$this->queue = $queue;
5052
$this->message = $message;
53+
$this->connectionName = $connectionName;
5154
}
5255

5356
/**

src/VladimirYuldashev/LaravelQueueRabbitMQ/Queue/RabbitMQQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function pop($queue = null)
165165
$message = $this->channel->basic_get($queue);
166166

167167
if ($message instanceof AMQPMessage) {
168-
return new RabbitMQJob($this->container, $this, $this->channel, $queue, $message);
168+
return new RabbitMQJob($this->container, $this, $this->channel, $queue, $message, $this->connectionName);
169169
}
170170
} catch (ErrorException $exception) {
171171
$this->reportConnectionError('pop', $exception);

0 commit comments

Comments
 (0)