Browse Source

feat:新增jupyter查询状态接口

pull/75/head
西大锐 1 year ago
parent
commit
603a91db9e
3 changed files with 6 additions and 9 deletions
  1. +1
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/JupyterService.java
  2. +4
    -7
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/JupyterServiceImpl.java
  3. +1
    -1
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelDependencyDaoMapper.xml

+ 1
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/JupyterService.java View File

@@ -12,7 +12,7 @@ public interface JupyterService {

void mlflow();

String runJupyterService(Integer id);
String runJupyterService(Integer id) throws Exception;

String stopJupyterService(Integer id) throws Exception;



+ 4
- 7
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/JupyterServiceImpl.java View File

@@ -76,13 +76,11 @@ public class JupyterServiceImpl implements JupyterService {
}

@Override
public String runJupyterService(Integer id) {
public String runJupyterService(Integer id) throws Exception {
DevEnvironment devEnvironment = this.devEnvironmentDao.queryById(id);
// if(devEnvironment == null){
//
// }
String envName = devEnvironment.getName();
//TODO 设置环境变量
if(devEnvironment == null){
throw new Exception("开发环境配置不存在");
}

// 提取数据集,模型信息,得到数据集模型的path
Map<String, Object> dataset = JacksonUtil.parseJSONStr2Map(devEnvironment.getDataset());
@@ -132,7 +130,6 @@ public class JupyterServiceImpl implements JupyterService {
if(StringUtils.isEmpty(frameLogPathVo.getPath())){
return JupyterStatusVo;
}

LoginUser loginUser = SecurityUtils.getLoginUser();
String podName = loginUser.getUsername().toLowerCase() + "-editor-pod";



+ 1
- 1
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelDependencyDaoMapper.xml View File

@@ -321,7 +321,7 @@
state = #{state},
</if>
</set>
where id = #{id} and state = 1
where id = #{id}
</update>

<!--通过主键删除-->


Loading…
Cancel
Save