What is the difference queue:work and queue:listen

前端 未结 4 1346
终归单人心
终归单人心 2020-12-29 20:11

I can\'t understand what\'s the difference between Laravel queue:work and Laravel queue:listen

I can see that:

  • Queue: Listen
4条回答
  •  青春惊慌失措
    2020-12-29 20:39

    The queue:work Artisan command includes a --daemon option for forcing the queue worker to continue processing jobs without ever re-booting the framework. This results in a significant reduction of CPU usage when compared to the queue:listen command:

    As you can see, the queue:work job supports most of the same options available to queue:listen. You may use the php artisan help queue:work job to view all of the available options.

    https://laravel.com/docs/5.1/queues#running-the-queue-listener

提交回复
热议问题