refactor(接口测试): 优化停止任务

This commit is contained in:
wxg0103 2024-04-11 18:10:54 +08:00 committed by Craftsman
parent 5ca174d2af
commit 617b44780e
1 changed files with 3 additions and 2 deletions

View File

@ -261,6 +261,9 @@ public class ApiTaskCenterService {
try { try {
LogUtils.info(String.format("开始发送停止请求到 %s 节点执行", endpoint), subList.toString()); LogUtils.info(String.format("开始发送停止请求到 %s 节点执行", endpoint), subList.toString());
TaskRunnerClient.stopApi(endpoint, subList); TaskRunnerClient.stopApi(endpoint, subList);
} catch (Exception e) {
LogUtils.error(e);
} finally {
if (request.getModuleType().equals(TaskCenterResourceType.API_CASE.toString())) { if (request.getModuleType().equals(TaskCenterResourceType.API_CASE.toString())) {
extApiReportMapper.updateReportStatus(subList, System.currentTimeMillis(), userId); extApiReportMapper.updateReportStatus(subList, System.currentTimeMillis(), userId);
extApiReportMapper.updateApiCaseStatus(subList); extApiReportMapper.updateApiCaseStatus(subList);
@ -271,8 +274,6 @@ public class ApiTaskCenterService {
extApiScenarioReportMapper.updateApiScenario(subList); extApiScenarioReportMapper.updateApiScenario(subList);
saveLog(subList, userId, path, method, module, TaskCenterResourceType.API_SCENARIO.toString()); saveLog(subList, userId, path, method, module, TaskCenterResourceType.API_SCENARIO.toString());
} }
} catch (Exception e) {
LogUtils.error(e);
} }
}); });
}); });