Vinelab / bowler

RabbitMQ wrapper for Laravel
MIT License
45 stars 9 forks source link

ErrorException : Undefined index: driver #38

Closed LauerPaul closed 5 years ago

LauerPaul commented 5 years ago

I can not run php artisan queue:work

harris21 commented 5 years ago

Hey @LauerPaul , did you try to run php artisan bowler:consume queue-name-here ?

LauerPaul commented 5 years ago

Hey @harris21, Thanks for the quick response. I thought he should work with the laravel queue. I tried your variant, but there is some kind of error. I want to understand how I can run the queue listener.

Symfony\Component\Debug\Exception\FatalThrowableError : Argument 1 passed to Vinelab\Bowler\Exceptions\Handler::__construct() must implement interface Vinelab\Bowler\Contracts\BowlerExceptionHandler, instance of App\Exceptions\Handler given

LauerPaul commented 5 years ago

Hey @harris21, Thanks for the quick response. I thought he should work with the laravel queue. I tried your variant, but there is some kind of error. I want to understand how I can run the queue listener.

Symfony\Component\Debug\Exception\FatalThrowableError : Argument 1 passed to Vinelab\Bowler\Exceptions\Handler::__construct() must implement interface Vinelab\Bowler\Contracts\BowlerExceptionHandler, instance of App\Exceptions\Handler given

php artisan bowler:consume auth_service

harris21 commented 5 years ago

@LauerPaul Please add to your Exceptions/Handler.php the implements BowlerExceptionHandler like it is being mentioned in the docs https://github.com/Vinelab/bowler#error-reporting and implement the following function in the same file: reportQueue(Exception $e, AMQPMessage $msg). Let me know if this worked for you.

LauerPaul commented 5 years ago

Thanks for the help, added the line

use PhpAmqpLib\Message\AMQPMessage;
use Vinelab\Bowler\Contracts\BowlerExceptionHandler;

edit class Handler extends ExceptionHandler implements BowlerExceptionHandler and it all worked!