0

I want to add some additional functionality when the queue is finished. I am using the queue::after function in the AppServiceProvider but this function is not being triggered. I have tried many solutions which were provided in the same kind of questions on StackOverflow like restarting the queue worker, clearing the cache and composer dump-autoload but didn't get any help.

 public function boot()
    {
        Queue::after(function (JobProcessed $event) {
            \Log::debug("Queue after"); // it should be printed in the logger
        });
    }

Any idea where am I going wrong?

4
  • Double-check your logging level. I was able to get this working with Log::info instead of Log::debug since my logging level is info.
    – aynber
    Jun 20, 2022 at 13:52
  • Tried with \Log::info("Queue after"); still not working Jun 20, 2022 at 13:56
  • What is your current logging channel/settings?
    – aynber
    Jun 20, 2022 at 13:58
  • laravel telescope and daily logger files Jun 20, 2022 at 13:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.