feat(device): 无障碍保护存活心跳检测 + 掉线后置检测(pull)

- device 表 + 心跳/注册/liveness 查询/ack 端点 + heartbeat_monitor_worker
  (扫描超时设备置 kill_alert_pending, 客户端进 App 拉取弹自启动引导)
- 本期只做 pull 后置检测, 不接推送(不含 jpush)
- 迁移: device_table → device_kill_alert_pending(接 main head ceb286289426, 线性单 head)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
陈世睿
2026-06-21 11:49:54 +08:00
parent 08bbb5775e
commit 2162056008
11 changed files with 618 additions and 0 deletions
+5
View File
@@ -27,6 +27,11 @@ JG_PRIVATE_KEY_PATH=./secrets/jverify_rsa_private.pem
JG_VERIFY_ENDPOINT=https://api.verification.jpush.cn/v1/web/loginTokenVerify
JG_REQUEST_TIMEOUT_SEC=15
# ===== 无障碍保护存活监控(pull 后置检测;本期不接推送)=====
HEARTBEAT_MONITOR_ENABLED=true
HEARTBEAT_TIMEOUT_MINUTES=10
HEARTBEAT_SCAN_INTERVAL_SEC=60
# ===== 短信 (mock 模式) =====
# mock = true 时,任意 6 位数字均通过,且 /sms/send 不真发短信(只 log)。
# 后续接阿里云/腾讯云短信时,改成 false 并填供应商相关 key。