You've already forked FrameTour-BE
fix(task): 解决原位替换模式下旧映射残留问题
- 在插入新映射前先删除已存在的旧映射记录 - 添加日志记录以便追踪旧映射删除操作 - 确保轮询服务能够正确处理最新的任务渲染作业映射关系
This commit is contained in:
@@ -722,6 +722,12 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
|
||||
// 写入mapping表,供轮询服务处理
|
||||
try {
|
||||
// 原位替换模式下可能已有旧映射,先删除再插入
|
||||
TaskRenderJobMappingEntity existingMapping = taskRenderJobMappingMapper.selectByTaskId(taskId);
|
||||
if (existingMapping != null) {
|
||||
taskRenderJobMappingMapper.deleteById(existingMapping.getId());
|
||||
log.info("[灰度测试] 已删除旧mapping, taskId: {}, oldRenderJobId: {}", taskId, existingMapping.getRenderJobId());
|
||||
}
|
||||
TaskRenderJobMappingEntity mapping = new TaskRenderJobMappingEntity();
|
||||
mapping.setTaskId(taskId);
|
||||
mapping.setRenderJobId(response.getJobId());
|
||||
|
||||
Reference in New Issue
Block a user