feat: 接入通知 outbox BullMQ 调度

- integrations/redis: 新增 BullMQ 连接参数工厂并复用 Redis 模块导出\n- notifications/wecom: 优先使用 BullMQ 周期调度 outbox 重试,Redis 不可用时降级进程内定时器\n- README/RTK/.env.example: 同步通知 outbox 重试和 Redis/BullMQ 配置说明
This commit is contained in:
湛兮
2026-06-12 06:55:07 +08:00
parent 4ca7eb7b1b
commit fd472e3346
9 changed files with 395 additions and 14 deletions
+6 -1
View File
@@ -10,7 +10,7 @@ DATABASE_URL=mysql://devops_user:devops_password@127.0.0.1:3306/devops_platform
USE_DATABASE_READS=false
PRISMA_CONNECT_ON_BOOT=false
# Redis and queues, reserved for async polling/notification workers.
# Redis and queues. Used by health checks and BullMQ-backed notification outbox retry.
REDIS_URL=redis://127.0.0.1:6379/0
# Jenkins integration, server-side only.
@@ -34,6 +34,11 @@ NOTIFICATION_PROVIDER=replace-with-provider
NOTIFICATION_WEBHOOK_URL=https://notification.example.internal/webhook/replace-with-secret-manager-value
FEISHU_WEBHOOK_URL=https://open.feishu.cn/open-apis/bot/v2/hook/replace-with-secret-manager-value
WECOM_WEBHOOK_URL=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=replace-with-secret-manager-value
NOTIFICATION_OUTBOX_RETRY_ENABLED=false
NOTIFICATION_OUTBOX_RETRY_INTERVAL_MS=30000
NOTIFICATION_OUTBOX_RETRY_DELAY_MS=60000
NOTIFICATION_OUTBOX_MAX_ATTEMPTS=3
NOTIFICATION_OUTBOX_BATCH_SIZE=10
# LLM proxy configuration, server-side only.
LLM_BASE_URL=https://llm.example.internal/v1