当前位置:网站首页>隊列使用問題總結 queue:work和queue:listen的區別
隊列使用問題總結 queue:work和queue:listen的區別
2022-04-22 03:17:00 【ignativs amor】
主要是記錄一下未配置supervisor時,項目使用隊列遇到的問題
一、遇到的問題
1、queue:work和queue:listen的區別
本地跑隊列發送消息,執行立即的任務就可以,但是延遲任務遲遲收不到消息,很納悶為啥?(本地並未配置supervissor)監聽隊列,使用的命令是:
php artisan queue:work
答:queue:work默認只執行一次隊列請求,當請求執行完成後就終止;這裏可以看出,要是延遲隊列,就不能使用該命令嘍
- queue:listen 監聽隊列請求,只要運行著,就能一直接受請求,除非手動終止
- queue:work --daemon 同listen 一樣,只要運行著,就能一直接受請求,不一樣的地方是在這個運行模式下,當新的請求到來的時候,**不重新加載整個框架 **, 而是直接 fire 動作。所以若是更改的代碼,需要停止,然後重新啟動。(該命令是在laravel4.2以後才加入的)
二、寫在最後
還是建議使用supervisor管理隊列,省的每次來來回回執行命令,配置supervissor參考:
使用supervisor管理laravel隊列
使用supervisor管理laravel隊列-配置文件supervisord.conf
版权声明
本文为[ignativs amor]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220317060704.html
边栏推荐
猜你喜欢

go语言实战-----30-----token机制微信公众号签名验证的方法、XML解析,CDATA解析、交换协议、接收消息协议、被动回复消息协议、正则表达式

An article gives you a preliminary understanding of the basic knowledge of C language operators

Serviceworker cache and HTTP cache

Saas. Extended field custom field

C language daily question -- xiaolele changing numbers (niuke.com)

Go language -----30-----token mechanism, WeChat official account signature verification method, XML parsing, CDATA parsing, exchange protocol, receive message protocol, passive reply message protocol,

Ros2 learning notes (III) -- collect and release images of virtual simulation environment

China Database ranking in April 2022: the spring breeze blows the face, the spring is warm, and the score rises in April

php.ini配置

Alipay two faces: how to use UDP to achieve reliable transmission?
随机推荐
使用supervisor管理laravel队列 - 配置文件supervisord.conf
On August 16, 2021, a bug in Zhengfang educational administration system was accidentally found
js力扣每日一题(2022/4/21)---824.山羊拉丁文
Allegro Gerber file path setting
List of persons elected to IEEE fellow in 2022
Sword finger office secant
Jiarong Technology Shenzhen Stock Exchange listed and discovered: The Value of Market of the company is 4.1 billion, and the Accounts receivables are 280 million.
[BJDCTF2020]Cookie is so stable(漏洞原理详解)
College English vocabulary analysis Chinese University MOOC Huazhong University of science and technology
go语言实战-----30-----token机制微信公众号签名验证的方法、XML解析,CDATA解析、交换协议、接收消息协议、被动回复消息协议、正则表达式
嘉戎技術深交所上市破發:公司市值41億 應收賬款2.8億
Exercise 23, pilot brothers [binary enumeration / bit operation]
Joint primary key and composite primary key creation of Oracle
2022年当选IEEE Fellow的人员列表
C language daily question -- xiaolele changing numbers (niuke.com)
Leetcode dictionary order
TP5在制作二维码
STM32 notes
Comparison of hex, Base64 and URLEncode coding schemes
JS 数字千位分隔符且保留两位小数