Browse Source

删除开发环境时停止jupyter

dev-service-czh
chenzhihang 1 year ago
parent
commit
5a47970422
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/DevEnvironmentService.java
  2. +2
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DevEnvironmentServiceImpl.java

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

@@ -54,5 +54,5 @@ public interface DevEnvironmentService {
*/
boolean deleteById(Integer id);

String removeById(Integer id);
String removeById(Integer id) throws Exception;
}

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

@@ -138,7 +138,7 @@ public class DevEnvironmentServiceImpl implements DevEnvironmentService {
}

@Override
public String removeById(Integer id) {
public String removeById(Integer id) throws Exception {
DevEnvironment devEnvironment = this.devEnvironmentDao.queryById(id);
if (devEnvironment == null){
return "开发环境信息不存在";
@@ -152,6 +152,7 @@ public class DevEnvironmentServiceImpl implements DevEnvironmentService {
return "无权限删除该开发环境";
}

jupyterService.stopJupyterService(id);
devEnvironment.setState(0);
return this.devEnvironmentDao.update(devEnvironment)>0?"删除成功":"删除失败";
}


Loading…
Cancel
Save