Skip to content

Commit bbabfc9

Browse files
committed
Merge branch 'v5.4'
2 parents d03095f + 9d259f8 commit bbabfc9

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-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: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,14 @@ 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(
169+
$this->container,
170+
$this,
171+
$this->channel,
172+
$queue,
173+
$message,
174+
$this->connectionName
175+
);
169176
}
170177
} catch (ErrorException $exception) {
171178
$this->reportConnectionError('pop', $exception);

0 commit comments

Comments
 (0)