Supervisor 3.3.1 运行 但未处理作业
Supervisor 3.3.1 running but not processing jobs
我有安装主管
[program:laravel_queue]
process_name=%(program_name)s_%(process_num)02d
command=php /usr/local/bin/run_queue.sh
startsecs = 0
autostart=true
autorestart=true
user=www-data
numprocs=3
redirect_stderr=true
stderr_logfile=/var/log/laraqueue.err.log
stdout_logfile=/var/log/laraqueue.out.log
run_queue.sh
#!/bin/bash
php /var/www/html/application/artisan --timeout=240 queue:work --tries=1
日志文件看起来像这样
但是 job
table 正在填满,它没有处理任何工作。在这方面的任何帮助表示赞赏
我做了一些更改以使其工作我不太确定是什么让它工作但这里是步骤:
我删除了对 run_queue.sh
的依赖并将命令移入 laravel_queue.conf
[program:laravel_queue]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/application/artisan queue:work --tries=1
startsecs = 0
autostart=true
autorestart=true
user=www-data
numprocs=3
redirect_stderr=true
stderr_logfile=/var/log/laraqueue.err.log
stdout_logfile=/var/log/laraqueue.out.log
另外,如果您注意到我从
更改了一些命令
--timeout=240 queue:work --tries=1
到
queue:work --tries=1 (this made it work in my opinion)
进行这些更改后,我 运行 执行以下命令:
sudo supervisorctl reread & sudo supervisorctl update
sudo supervisorctl start laravel_queue:*
我有安装主管
[program:laravel_queue]
process_name=%(program_name)s_%(process_num)02d
command=php /usr/local/bin/run_queue.sh
startsecs = 0
autostart=true
autorestart=true
user=www-data
numprocs=3
redirect_stderr=true
stderr_logfile=/var/log/laraqueue.err.log
stdout_logfile=/var/log/laraqueue.out.log
run_queue.sh
#!/bin/bash
php /var/www/html/application/artisan --timeout=240 queue:work --tries=1
日志文件看起来像这样
但是 job
table 正在填满,它没有处理任何工作。在这方面的任何帮助表示赞赏
我做了一些更改以使其工作我不太确定是什么让它工作但这里是步骤:
我删除了对 run_queue.sh
的依赖并将命令移入 laravel_queue.conf
[program:laravel_queue]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/application/artisan queue:work --tries=1
startsecs = 0
autostart=true
autorestart=true
user=www-data
numprocs=3
redirect_stderr=true
stderr_logfile=/var/log/laraqueue.err.log
stdout_logfile=/var/log/laraqueue.out.log
另外,如果您注意到我从
更改了一些命令--timeout=240 queue:work --tries=1
到
queue:work --tries=1 (this made it work in my opinion)
进行这些更改后,我 运行 执行以下命令:
sudo supervisorctl reread & sudo supervisorctl update
sudo supervisorctl start laravel_queue:*