项目背景:因为tp5.0没有集成队列,所以自己动手加, 环境:thinkphp5.0,redis6,thinkphp-queue,supervisor
1.安装queue 安装一下连接就可以,比较简单
安装queue
2.安装supervisor
2.1安装
#yum 安装 supervisor
yum install -y supervisor
#生成配置文件 配置文件生成位置为/etc/supervisor.conf
echo_supervisord_conf > /etc/supervisord.conf
2.2配置
vi /etc/supservisor.conf
#修改一下配置 注意:配置文件中/tmp开头的都要改掉,因为tmp是linux存放临时文件的地方随时会清掉
[unix_http_server]
file=/var/run/supervisor/supervisor.sock
[supervisord]
logfile=/var/log

本文介绍了在ThinkPHP5.0项目中如何手动添加队列功能,使用Redis和Supervisor进行管理。内容包括安装ThinkPHP-Queue,配置和启动Supervisor,以及解决配置过程中遇到的问题,如'unix:///var/run/supervisor.sock refused connection'等。
最低0.47元/天 解锁文章
1654

被折叠的 条评论
为什么被折叠?



