Skip to content

Commit

Permalink
Added missing connectionName
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Fly committed May 16, 2017
1 parent 543248a commit 3083b04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,22 @@ class RabbitMQJob extends Job implements JobContract
* @param \PhpAmqpLib\Channel\AMQPChannel $channel
* @param string $queue
* @param \PhpAmqpLib\Message\AMQPMessage $message
* @param string $connectionName
*/
public function __construct(
Container $container,
RabbitMQQueue $connection,
AMQPChannel $channel,
$queue,
AMQPMessage $message
AMQPMessage $message,
$connectionName
) {
$this->container = $container;
$this->connection = $connection;
$this->channel = $channel;
$this->queue = $queue;
$this->message = $message;
$this->connectionName = $connectionName;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function pop($queue = null)
$message = $this->channel->basic_get($queue);

if ($message instanceof AMQPMessage) {
return new RabbitMQJob($this->container, $this, $this->channel, $queue, $message);
return new RabbitMQJob($this->container, $this, $this->channel, $queue, $message, $this->connectionName);
}
} catch (ErrorException $exception) {
$this->reportConnectionError('pop', $exception);
Expand Down

0 comments on commit 3083b04

Please sign in to comment.