From db3ce4581d91656285072d403682d6d4ac7bd749 Mon Sep 17 00:00:00 2001 From: fanshuai <1141904845@qq.com> Date: Thu, 19 Sep 2024 11:46:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=A2=E5=9B=9E=E5=8E=9F=E6=9D=A5=E7=9A=84HT?= =?UTF-8?q?TPUTILS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/platform/service/impl/ExperimentServiceImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentServiceImpl.java index 811253e..9809438 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentServiceImpl.java @@ -8,6 +8,7 @@ import com.ruoyi.platform.domain.dependencydomain.TrainTaskDepency; import com.ruoyi.platform.mapper.ExperimentDao; import com.ruoyi.platform.mapper.ExperimentInsDao; import com.ruoyi.platform.service.*; +import com.ruoyi.platform.utils.HttpUtils; import com.ruoyi.platform.utils.JacksonUtil; import com.ruoyi.platform.utils.JsonUtils; import com.ruoyi.platform.utils.NewHttpUtils; @@ -55,8 +56,6 @@ public class ExperimentServiceImpl implements ExperimentService { @Resource @Lazy private ExperimentInsService experimentInsService; - @Resource - private NewHttpUtils httpUtils; @Value("${argo.url}") private String argoUrl; @Value("${argo.convert}") @@ -223,7 +222,7 @@ public class ExperimentServiceImpl implements ExperimentService { String dag = workflow.getDag(); // 调argo转换接口 try { - String convertRes = httpUtils.sendPost(argoUrl + argoConvert,null, dag); + String convertRes = HttpUtils.sendPost(argoUrl + argoConvert, dag); if (convertRes == null || StringUtils.isEmpty(convertRes)) { throw new RuntimeException("转换流水线失败"); } @@ -242,7 +241,7 @@ public class ExperimentServiceImpl implements ExperimentService { Map output = (Map) converMap.get("output"); // 调argo运行接口 - String runRes = httpUtils.sendPost(argoUrl + argoWorkflowRun,null, JsonUtils.mapToJson(runReqMap)); + String runRes = HttpUtils.sendPost(argoUrl + argoWorkflowRun, JsonUtils.mapToJson(runReqMap)); if (runRes == null || StringUtils.isEmpty(runRes)) { throw new RuntimeException("Failed to run workflow.");