File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file.
44
5- ## [ 10.0.0 (2019-12-12)] ( https://github.com/vyuldashev/laravel-queue-rabbitmq/compare/v9.0...master )
5+ ## [ 10.0.1 (2019-12-13)] ( https://github.com/vyuldashev/laravel-queue-rabbitmq/compare/v10.0.0...v10.0.1 )
6+
7+ - Add missing container instance and connectionName to RabbitMQJob
8+
9+ ## [ 10.0.0 (2019-12-12)] ( https://github.com/vyuldashev/laravel-queue-rabbitmq/compare/v9.0...v10.0.0 )
610
711- Switch from enqueue to [ php-amqplib] ( https://github.com/php-amqplib/php-amqplib )
812- Fix [ #235 ] ( https://github.com/vyuldashev/laravel-queue-rabbitmq/issues/235 )
Original file line number Diff line number Diff line change 22
33namespace VladimirYuldashev \LaravelQueueRabbitMQ \Queue \Jobs ;
44
5+ use Illuminate \Container \Container ;
56use Illuminate \Contracts \Container \BindingResolutionException ;
67use Illuminate \Contracts \Queue \Job as JobContract ;
78use Illuminate \Queue \Jobs \Job ;
@@ -35,12 +36,16 @@ class RabbitMQJob extends Job implements JobContract
3536 protected $ decoded ;
3637
3738 public function __construct (
39+ Container $ container ,
3840 RabbitMQQueue $ rabbitmq ,
3941 AMQPMessage $ message ,
42+ string $ connectionName ,
4043 string $ queue
4144 ) {
45+ $ this ->container = $ container ;
4246 $ this ->rabbitmq = $ rabbitmq ;
4347 $ this ->message = $ message ;
48+ $ this ->connectionName = $ connectionName ;
4449 $ this ->queue = $ queue ;
4550 $ this ->decoded = $ this ->payload ();
4651 }
Original file line number Diff line number Diff line change @@ -198,7 +198,13 @@ public function pop($queue = null)
198198
199199 /** @var AMQPMessage|null $message */
200200 if ($ message = $ this ->channel ->basic_get ($ queue )) {
201- return new RabbitMQJob ($ this , $ message , $ queue );
201+ return new RabbitMQJob (
202+ $ this ->container ,
203+ $ this ,
204+ $ message ,
205+ $ this ->connectionName ,
206+ $ queue
207+ );
202208 }
203209 } catch (AMQPProtocolChannelException $ exception ) {
204210 // if there is not exchange or queue AMQP will throw exception with code 404
You can’t perform that action at this time.
0 commit comments