文件
xiaozhongchuf/deploy/supervisor/shopro-queue.conf
可乐加冰 2456ad6945 ```
feat(deploy): 添加部署路径权限检查功能

Webhook 由 PHP(www) 触发,项目目录必须对当前用户可写。
添加了对 DEPLOY_PATH 的写权限检查,如果当前用户对部署路径没有写权限,
则显示错误信息并退出部署流程。同时提供修复建议:
chown -R www:www ${DEPLOY_PATH} && chmod -R u+rwX ${DEPLOY_PATH}
```
2026-10-26 15:55:43 +08:00

61 行
2.2 KiB
Plaintext

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

; Shopro 队列守护(Supervisor)
;
; 安装步骤见下方注释,或阅读 deploy/supervisor/install.sh
;
; 队列说明:
; shopro-high 支付后处理(返积分、减库存、拼团、打印小票等,需优先消费)
; shopro 订单自动关闭/确认/评价、消息通知、分销升级、活动等
;
; 使用前请修改:
; 1. PHP_BIN → 服务器 php 绝对路径(宝塔常见:/www/server/php/74/bin/php)
; 2. DEPLOY_PATH → 站点根目录(含 think 文件,非 public)
; ---------------------------------------------------------------------------
; 高优先级队列(积分返还、打印等)
; ---------------------------------------------------------------------------
[program:shopro-queue-high]
process_name=%(program_name)s_%(process_num)02d
command=PHP_BIN_PLACEHOLDER DEPLOY_PATH_PLACEHOLDER/think queue:listen --queue shopro-high --sleep 1 --timeout 120 --memory 256
directory=DEPLOY_PATH_PLACEHOLDER
autostart=true
autorestart=true
startsecs=3
startretries=10
stopasgroup=true
killasgroup=true
stopwaitsecs=120
user=www
numprocs=1
redirect_stderr=true
stdout_logfile=DEPLOY_PATH_PLACEHOLDER/runtime/log/supervisor-shopro-high.log
stdout_logfile_maxbytes=20MB
stdout_logfile_backups=10
; ---------------------------------------------------------------------------
; 普通队列(自动关单、通知、分销等)
; ---------------------------------------------------------------------------
[program:shopro-queue]
process_name=%(program_name)s_%(process_num)02d
command=PHP_BIN_PLACEHOLDER DEPLOY_PATH_PLACEHOLDER/think queue:listen --queue shopro --sleep 3 --timeout 120 --memory 256
directory=DEPLOY_PATH_PLACEHOLDER
autostart=true
autorestart=true
startsecs=3
startretries=10
stopasgroup=true
killasgroup=true
stopwaitsecs=120
user=www
numprocs=1
redirect_stderr=true
stdout_logfile=DEPLOY_PATH_PLACEHOLDER/runtime/log/supervisor-shopro.log
stdout_logfile_maxbytes=20MB
stdout_logfile_backups=10
; ---------------------------------------------------------------------------
; 分组(可选,便于 supervisorctl 批量管理)
; ---------------------------------------------------------------------------
[group:shopro-queue]
programs=shopro-queue-high,shopro-queue
priority=999