sh Laravel队列主管

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Laravel队列主管相关的知识,希望对你有一定的参考价值。

Install Supervisor with `sudo apt-get install supervisor`. Ensure it's started with `sudo service supervisor restart`.

In `/etc/supervisord/conf.d/` create a `.conf` file. In this example, `laravel_queue.conf` (contents below). Give it execute permissions: `chmod +x laravel_queue.conf`.

This file points at `/usr/local/bin/run_queue.sh`, so create that file there. Give this execute permissions, too: `chmod +x run_queue.sh`.

Now update Supervisor with: `sudo supervisorctl reread`. And start using those changes with: `sudo supervisorctl update`.
[program:laravel_queue]
command=/usr/local/bin/run_queue.sh
autostart=true
autorestart=true
stderr_logfile=/var/log/laraqueue.err.log
stdout_logfile=/var/log/laraqueue.out.log
#!/bin/bash
php /path/to/AppName/artisan --env=production --timeout=240 queue:listen

以上是关于sh Laravel队列主管的主要内容,如果未能解决你的问题,请参考以下文章

sh laravel主管

无法获得工匠队列:在 Elastic Beanstalk (Laravel/Redis) 上使用主管处理作业

Laravel Lumen 队列失败与队列:工作但不是队列:听

Laravel 队列和 Azure WebJob

使用 Supervisor 运行多个 Laravel 队列工作者

laravel 队列守护进程邮件因 SSL 错误而停止运行