lzh d876d0387a refactor(video): @Scheduled 转 xxl-job,对齐 ops 模块定时任务约定
WVP 原生单体采用 @Scheduled 做周期任务,位于 ServiceImpl 上的任务
Spring 用 JDK 代理无法匹配到接口方法,导致启动失败。按 ops 模块
约定(QueueSyncJob 模板),把 6 个 ServiceImpl 的周期任务转为
独立 @XxlJob Job 类;2 个 IMessageHandler 的高频轮询拆为独立
无接口 @Component。

新建 6 个 Job 类(framework/job/):
- InviteStreamCleanupJob (10s)    清理 Redis 错误 Invite 数据
- DeviceSubscribeLostCheckJob (10s) 设备订阅丢失检查
- DeviceStatusLostCheckJob (30s)   设备状态丢失检查
- PlatformStatusLostCheckJob (20s) 平台注册状态检查
- PlatformAutoRegisterJob (2s)     级联平台自动注册监听
- AiEdgeDeviceOfflineCheckJob (90s) AI 边缘设备离线标记

接口变更(让 Job 类通过 JDK 代理正常调用):
- IInviteStreamService 新增 cleanInvalidInviteCache()
- IDeviceService 新增 lostCheckForSubscribe() / lostCheckForStatus()
- IPlatformService 新增 statusLostCheck() / cascadePlatformAutoRegister()
- PlatformServiceImpl.execute() 重命名为 cascadePlatformAutoRegister()

ServiceImpl 调整:
- InviteStream/Device/Platform/AiEdgeDevice ServiceImpl 删除
  @Scheduled 注解,方法体保留
- 清理 @Scheduled / TimeUnit 无用 import

新建 2 个高频 Scheduler @Component(保持 100-200ms 毫秒级轮询):
- AlarmNotifyMessageQueueScheduler (200ms)
- KeepaliveNotifyMessageQueueScheduler (100ms)
这两个消息处理器是 SIP 协议栈内部机制,不适合走 xxl-job 中心调度,
拆到独立无接口 Component 后 Spring 自动走 CGLIB,代理正常。
原 MessageHandler 删除 @Scheduled 注解,executeTaskQueue() 保留
为 public 供新 Scheduler 调用。

配置:本地 xxl.job.enabled=false 已配置(与 ops 对齐)

编译通过(mvn compile BUILD SUCCESS)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 14:29:51 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
2026-04-16 15:28:49 +08:00
2025-12-31 11:48:19 +08:00
2025-12-31 11:48:19 +08:00
Description
aiot后端(微服务版)
MIT 20 MiB
Languages
Java 80.2%
PLpgSQL 12.7%
TSQL 6.7%
Python 0.2%