feat:新增jupyter查询状态接口

This commit is contained in:
西大锐 2024-06-13 17:22:51 +08:00
parent a864f0bd2a
commit 603a91db9e
3 changed files with 6 additions and 9 deletions

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;

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

View File

@ -321,7 +321,7 @@
state = #{state},
</if>
</set>
where id = #{id} and state = 1
where id = #{id}
</update>
<!--通过主键删除-->