Closed saeid78 closed 4 years ago
Sounds like a feature request, not a bug.
Thx @taylorotwell But I have followed https://laravel.com/docs/5.7/queues#failed-job-events Shouldn't I expect to get an Exception there? Do I need to bring this out somewhere else ? please advice.
The docs don't document everything, ::failed
is the generalization.
There's another (in the docs undocumented) event ::exceptionOccurred
which receives it:
Queue::exceptionOccurred(function (JobExceptionOccurred $event) {
…
\Illuminate\Queue\Events\JobExceptionOccurred
contains the job and the exception
Thx @mfn for the info!
@mfn Great feature, thank you!
Hi, I have set up queue:failing in the boot method and was expecting to catch exception , but it only return connection Name! I have this : Queue::failing(function (JobFailed $event) { Log::error('JobFailed. ' . json_encode([ 'connectionName' => $event->connectionName, 'job' => $event->job, 'exception' => $event->exception ])); }); And this is my Command: command=php /var/www/html/artisan queue:work redis --sleep=3 --tries=3 --quiet Thanks!