Answer the question
In order to leave comments, you need to log in
Laravel 5.4 event queue fails (max retries) and failed() is not called?
I have an event called when the project is deleted:
<?php
namespace App\Listeners;
use App\Events\ProjectDeleted;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
class DeleteProjectData implements ShouldQueue
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param ProjectDeleted $event
* @return void
*/
public function handle(ProjectDeleted $event)
{
\Log::info('PROJECT DELETED FAKE LOG');
}
public function failed(ProjectDeleted $event, Exception $exception)
{
\Log::info('Failed, exception:');
\Log::info($exception);
}
}
//***
QUEUE_DRIVER=database
//***
[2017-04-17 00:43:15] Processing: App\Listeners\DeleteProjectData
[2017-04-17 00:43:15] Processing: App\Listeners\DeleteProjectData
[2017-04-17 00:43:15] Processing: App\Listeners\DeleteProjectData
[2017-04-17 00:43:15] Processing: App\Listeners\DeleteProjectData
//и так 255 раз
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question