事务修改

This commit is contained in:
even 2025-06-10 09:50:08 +08:00
parent d083c2be99
commit 898de4e49a
2 changed files with 3 additions and 2 deletions

View File

@ -152,7 +152,8 @@ public class DefaultRunContextManager implements RunContextManager {
}
pipelineRunContext.changeContextStateAndChild(stateEnum);
}
@Transactional(rollbackFor = Exception.class)
// 记录日志需要新事物成功或失败不影响流水线执行
@Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW)
public void toHistory(String pipelineId){
log.info("========================开始入库");
BaseRunContext context = getContext(pipelineId);

View File

@ -118,7 +118,7 @@ public class MemoryLogManager implements LoggerManager {
}
}
}
@Transactional
@Transactional(rollbackFor = Exception.class)
public void flushMemory(List<TaskRunContext> taskContextList){
log.info("流水线日志开始入库");
List<PipTaskLog> insertList = new ArrayList<>();