Laravel排队::功能不起作用?

发布于 2025-02-08 21:37:14 字数 436 浏览 3 评论 0原文

队列完成后,我想添加一些其他功能。我正在使用queue :: afterappServiceProvider中,但没有触发此功能。我尝试了许多解决方案,这些解决方案在stackoverflow上提供了相同类型的问题,例如重新启动队列工人,清除缓存和COMPOSER DUMP-AUTOLODOD,但没有得到任何帮助。

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

知道我要在哪里出错吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文