What is the difference between queue:work --daemon and queue:listen

后端 未结 4 1941
礼貌的吻别
礼貌的吻别 2020-11-28 22:12

I\'m settin up my offline job server. I\'ve read the documentation but I still don\'t really see the differences between the two commands: artisan queue:work --daemon<

4条回答
  •  猫巷女王i
    2020-11-28 22:31

    The most important difference is that queue:work --daemon does not restart the framework on each job, but queue:listen does. In fact, listen starts a whole new Laravel process for each job.

    Try for yourself: Open 2 terminals and run work --daemon in one and listen in the other. The work window will execute jobs much faster than listen.

提交回复
热议问题