fix(lottery): 增加广播任务时效保护并强化命令异常处理
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled

- 为多个广播事件添加 retryUntil 方法,设置派发后 30 秒内必须执行,否则丢弃
- 修改 LotteryDrawTickCommand handle,添加异常捕获及错误日志,保证失败时返回 FAILURE
- 修改 LotteryHallCountdownCommand handle,添加异常捕获及错误日志,超时情况写入警告日志
- 针对 SettlementOrchestrator 和 DrawHallSnapshotBuilder 查询结果添加限制,防止数据量过大
- 调整计划任务 withoutOverlapping 调用,增加 expiresAt 参数避免任务锁死
- 更新 .env.example,完善本地开发与生产环境部署说明及日志配置说明
- 移除 e2e 相关测试代码、配置及依赖,精简项目体积
This commit is contained in:
2026-07-07 13:37:05 +08:00
parent 12ffdebb62
commit f0e0966a73
54 changed files with 105 additions and 3848 deletions

View File

@@ -1,5 +1,6 @@
# cp .env.example .env && composer install && php artisan key:generate && php artisan migrate
# 生产常驻queue:work、schedule:work、reverb:start见 README
# 本地开发:cp .env.example .env && composer install && php artisan key:generate && php artisan migrate
# 生产部署bash scripts/deploy.sh自动切换 .env.production见 scripts/deploy.sh
# 生产常驻进程queue:work、schedule:work、reverb:start见 README / docs/production-runbook.md
APP_NAME=Lottery
APP_ENV=local
@@ -9,7 +10,10 @@ APP_URL=http://localhost:8000
APP_BIND_HOST=127.0.0.1
VITE_HOST=0.0.0.0
# 本地开发debug 方便排查;生产用 scripts/deploy.sh 自动切换 .env.productionLOG_LEVEL=warning
LOG_CHANNEL=daily
LOG_LEVEL=debug
LOG_DAILY_DAYS=14
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1