; 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