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.");