fix: 修复串行队列特殊情况重复执行问题

Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
fit2-zhao 2024-08-07 11:21:44 +08:00 committed by 刘瑞斌
parent 53992bfbf7
commit eabe03a8e8
1 changed files with 1 additions and 1 deletions

View File

@ -420,7 +420,7 @@ public class ApiExecutionQueueService {
} else { } else {
// 用例/接口超时结果处理 // 用例/接口超时结果处理
ApiDefinitionExecResultWithBLOBs result = apiDefinitionExecResultMapper.selectByPrimaryKey(item.getReportId()); ApiDefinitionExecResultWithBLOBs result = apiDefinitionExecResultMapper.selectByPrimaryKey(item.getReportId());
if (result != null && StringUtils.equalsAnyIgnoreCase(result.getStatus(), ApiReportStatus.RUNNING.name())) { if (result != null && StringUtils.equalsAnyIgnoreCase(result.getStatus(), ApiReportStatus.RUNNING.name()) && result.getStartTime() < timeout) {
result.setStatus(ApiReportStatus.ERROR.name()); result.setStatus(ApiReportStatus.ERROR.name());
apiDefinitionExecResultMapper.updateByPrimaryKeySelective(result); apiDefinitionExecResultMapper.updateByPrimaryKeySelective(result);