前往顾页
以后地位: 主页 > 精通Office > Ubuntu教程 >

Centos 7 装置Supervisor办理Laravel Queue

时候:2018-06-29 23:43来源:知行网www.zhixing123.cn 编辑:麦田守望者

装置
直接利用 yum进行装置,最好装置3以上的版本

# yum info supervisor
# yum install supervisor
建设
编辑建设文件

# vim /etc/supervisord.conf
在最前面增加下面内容:

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/forge/app.com/artisan queue:work --tries=3
autostart=true
autorestart=true
user=forge //重视这里队列以甚么用户权限运行
numprocs=8 //启动多少个过程
redirect_stderr=true
stdout_logfile=/home/forge/app.com/worker.log
履行 supervisord启动supervisord办事。

# supervisord
...
'Supervisord is running as root and it is searching '
...
履行下面号令,启动下面建设好的laravel队列

# supervisorctl start laravel-worker:*
当Job代码变动时,需求从头启动队列

# supervisorctl restart laravel-worker:*
laravel-worker:laravel-worker_00: stopped
laravel-worker:laravel-worker_01: stopped
laravel-worker:laravel-worker_02: stopped
laravel-worker:laravel-worker_03: stopped
laravel-worker:laravel-worker_04: stopped
laravel-worker:laravel-worker_05: stopped
laravel-worker:laravel-worker_06: stopped
laravel-worker:laravel-worker_07: stopped
laravel-worker:laravel-worker_00: started
laravel-worker:laravel-worker_01: started
laravel-worker:laravel-worker_02: started
laravel-worker:laravel-worker_03: started
laravel-worker:laravel-worker_04: started
laravel-worker:laravel-worker_05: started
laravel-worker:laravel-worker_06: started
laravel-worker:laravel-worker_07: started

顶一下
(0)
0%
踩一下
(0)
0%
------分开线----------------------------
标签(Tag):CentOS 装置Supervisor办理
------分开线----------------------------
颁发评论
请自发遵循互联网相关的政策法规,严禁公布色情、暴力、革命的谈吐。
评价:
神色:
考证码:点击我更换图片
猜你感兴趣