arifulhb
1 year ago

Laravel 5.6 Job Event Queue::after not firing after queue processed

Posted 1 year ago by arifulhb

In an application I am working, I've both Job and Event Listener implemented Should Queue. In the queue, I perform a database insert and I want after the queue complete, I want to remove the previous cache. So I use Queue Job Event like this example:

class AppServiceProvider extends ServiceProvider
{

    public function boot()
    {
      
        Queue::after(function (JobProcessed $event) {

           Log::info('[QUEUE COMPLETE]', $event->job->getName());

        });
    }

    
    public function register()
    {
        //
    }
}

But the event is never fired and there is no log found in storage/log folder. I use daily logging channel.

Why is it not logging?

Please sign in or create an account to participate in this conversation.