fix(video): 修复任务状态查询逻辑并优化Redis过期策略

- 修改人脸模板渲染状态存储逻辑,增加默认过期时间
- 移除AppTaskController中冗余的JwtInfo获取代码
- 优化GoodsServiceImpl中任务状态判断逻辑,增强空值检查
- 修复视频任务状态返回不准确的问题,完善边界条件处理
This commit is contained in:
2025-12-17 16:42:09 +08:00
parent 171932c05c
commit c8560e3aca
3 changed files with 7 additions and 6 deletions

View File

@@ -249,8 +249,7 @@ public class FaceStatusManager {
return;
}
String key = String.format(FACE_TEMPLATE_RENDER_KEY, faceId, templateId);
// 渲染状态不设置过期时间,永久保存
redisTemplate.opsForValue().set(key, String.valueOf(status.getCode()));
redisTemplate.opsForValue().set(key, String.valueOf(status.getCode()), DEFAULT_EXPIRE_SECONDS, TimeUnit.SECONDS);
log.debug("设置模板渲染状态: faceId={}, templateId={}, status={}", faceId, templateId, status.getDescription());
}