我的问题是,运行Laravel Horizon工作人员的最佳和最简单的方法是什么?
我的技术堆栈
Laravel 5.5 地平线 Redis队列 Centos下我已经阅读了文档https://laravel.com/docs/5.5/horizon
如何设置以上链接中提到的以下主管 主管配置
[program:horizon] process_name=%(program_name)s command=php /home/forge/app.com/artisan horizon autostart=true autorestart=true user=forge redirect_stderr=true stdout_logfile=/home/forge/app.com/horizon.log注意:我有自己的自定义构建服务器和php 7.1,后来我安装了Horizon来运行我的作业并维护队列。
有关如何运行Workers的任何建议或我应该在哪里配置Supervisor配置 ?
My question is what is the best and simple way to run the Laravel Horizon based job workers?
My Tech Stack
Laravel 5.5 Horizon Redis Queues CentosI have gone through the document https://laravel.com/docs/5.5/horizon
How to setup following supervisor as mentioned on the link above Supervisor Configuration
[program:horizon] process_name=%(program_name)s command=php /home/forge/app.com/artisan horizon autostart=true autorestart=true user=forge redirect_stderr=true stdout_logfile=/home/forge/app.com/horizon.logNote: I have my own custom build server with php 7.1 and I later installed Horizon to run my Jobs and maintain the queues.
Any suggestion regarding how to run the Workers or where should I configure above Supervisor Configuration?
最满意答案
确保安装了主管:
对于debian / ubuntu:
apt install supervisorCentOS的:
easy_install supervisor要么
yum install supervisor你也可以这样做:
systemctl enable supervisord确保主管在启动时运行
现在在/etc/supervisor/conf.d/创建一个名为/etc/supervisor/conf.d/的新文件,并添加上面的配置。
现在做:
sudo supervisorctl reread重读配置
sudo supervisorctl update要重新加载配置并重新启动该过程
sudo supervisorctl start all要么
sudo supervisorctl start horizon开始视野
Make sure you have supervisor installed:
For debian/ubuntu:
apt install supervisorcentos:
easy_install supervisoror
yum install supervisorYou can also do:
systemctl enable supervisordTo make sure supervisor runs at startup
Now create a new file in /etc/supervisor/conf.d/ named horizon.conf and add the above configuration.
Now do:
sudo supervisorctl rereadTo reread the configs
sudo supervisorctl updateTo reload the configs and restart the process
sudo supervisorctl start allor
sudo supervisorctl start horizonTo start horizon
更多推荐
发布评论