线程中断注释掉

This commit is contained in:
even 2025-06-10 09:46:21 +08:00
parent df4770d908
commit d083c2be99
6 changed files with 25 additions and 13 deletions

View File

@ -95,8 +95,11 @@ public class PipelineRunContext extends BaseRunContext{
||ContextStateEnum.BAD_ENDING.equals(stateEnum)
||ContextStateEnum.SKIP_TO.equals(stateEnum)) {
this.endTime=LocalDateTime.now();
// 入库保存
contextManager.toHistory(getContextDef().getId());
if (!curr.equals(ContextStateEnum.HAPPY_ENDING)) {
// 入库保存
contextManager.toHistory(getContextDef().getId());
}
}
} else {
log.error("非法状态扭转直接忽略,{},{}",curr,stateEnum);

View File

@ -149,7 +149,8 @@ public class ApplicationWorker extends HttpWorker {
append(context,message);
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"SCA-应用包审查分析节点执行失败");
}
Thread.currentThread().interrupt();
// Thread.currentThread().interrupt();
toBadEnding();
}
private MultiValueMap<String, Object> buildRequestBody(Map<String, Object> applicationConfigInfo, File file) {
@ -214,7 +215,8 @@ public class ApplicationWorker extends HttpWorker {
// 轮询间隔 5
Thread.sleep(POLLING_INTERVAL);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// Thread.currentThread().interrupt();
toBadEnding();
log.error("轮询被中断: " + e.getMessage());
}
currentPollingTimes++;

View File

@ -194,7 +194,8 @@ public class CodingWorker extends HttpWorker {
// 轮询间隔 5
Thread.sleep(POLLING_INTERVAL);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// Thread.currentThread().interrupt();
toBadEnding();
log.error("轮询被中断: " + e.getMessage());
}
currentPollingTimes++;

View File

@ -158,7 +158,8 @@ public class ScaBinaryWorker extends HttpWorker {
append(context,message);
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"SCA-SBOM节点执行失败");
}
Thread.currentThread().interrupt();
// Thread.currentThread().interrupt();
toBadEnding();
}
private MultiValueMap<String, Object> buildRequestBody(Map<String, Object> scaBinaryConfigInfo, File file) {
@ -224,7 +225,8 @@ public class ScaBinaryWorker extends HttpWorker {
// 轮询间隔 5
Thread.sleep(POLLING_INTERVAL);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// Thread.currentThread().interrupt();
toBadEnding();
log.error("轮询被中断: " + e.getMessage());
}
currentPollingTimes++;

View File

@ -155,7 +155,8 @@ public class ScaMirrorWorker extends HttpWorker {
append(context,message);
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"SCA-SBOM节点执行失败");
}
Thread.currentThread().interrupt();
// Thread.currentThread().interrupt();
toBadEnding();
}
private MultiValueMap<String, Object> buildRequestBody(Map<String, Object> scaMirrorConfigInfo, File file) {
@ -227,7 +228,8 @@ public class ScaMirrorWorker extends HttpWorker {
// 轮询间隔 5
Thread.sleep(POLLING_INTERVAL);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// Thread.currentThread().interrupt();
toBadEnding();
log.error("轮询被中断: " + e.getMessage());
}
currentPollingTimes++;

View File

@ -85,8 +85,8 @@ public class ScaSbomWorker extends HttpWorker {
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"目标文件不存在");
}
TargetVersion targetVersion = targetVersionService.getById(pipeline.getTargetVersionId());
filePath = targetVersion.getFilePath();
// filePath = targetVersion.getFilePath();
filePath = "C:\\Users\\admin\\Desktop\\新建文件夹\\dist.zip";
try {
@ -151,7 +151,8 @@ public class ScaSbomWorker extends HttpWorker {
append(context,message);
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"SCA-SBOM节点执行失败");
}
Thread.currentThread().interrupt();
// Thread.currentThread().interrupt();
toBadEnding();
}
private MultiValueMap<String, Object> buildRequestBody(Map<String, Object> scaSbomConfigInfo, File file) {
@ -216,7 +217,8 @@ public class ScaSbomWorker extends HttpWorker {
// 轮询间隔 5
Thread.sleep(POLLING_INTERVAL);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// Thread.currentThread().interrupt();
toBadEnding();
log.error("轮询被中断: " + e.getMessage());
}
currentPollingTimes++;