From 617b44780e25a18a5702aa1b17eeb4efe869d2b5 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 11 Apr 2024 18:10:54 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E5=81=9C=E6=AD=A2=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/api/service/ApiTaskCenterService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiTaskCenterService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiTaskCenterService.java index 298e939a62..20a85f6397 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiTaskCenterService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/ApiTaskCenterService.java @@ -261,6 +261,9 @@ public class ApiTaskCenterService { try { LogUtils.info(String.format("开始发送停止请求到 %s 节点执行", endpoint), subList.toString()); TaskRunnerClient.stopApi(endpoint, subList); + } catch (Exception e) { + LogUtils.error(e); + } finally { if (request.getModuleType().equals(TaskCenterResourceType.API_CASE.toString())) { extApiReportMapper.updateReportStatus(subList, System.currentTimeMillis(), userId); extApiReportMapper.updateApiCaseStatus(subList); @@ -271,8 +274,6 @@ public class ApiTaskCenterService { extApiScenarioReportMapper.updateApiScenario(subList); saveLog(subList, userId, path, method, module, TaskCenterResourceType.API_SCENARIO.toString()); } - } catch (Exception e) { - LogUtils.error(e); } }); });