|
|
|
@@ -57,7 +57,7 @@ public class AutoMlInsServiceImpl implements AutoMlInsService { |
|
|
|
if (StringUtils.isEmpty(autoMlIns.getStatus())) { |
|
|
|
autoMlIns = queryStatusFromArgo(autoMlIns); |
|
|
|
} |
|
|
|
if (StringUtils.equals(autoMlIns.getStatus(), "Running")) { |
|
|
|
if (StringUtils.equals(autoMlIns.getStatus(), Constant.Running)) { |
|
|
|
return "实验实例正在运行,不可删除"; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -156,7 +156,7 @@ public class AutoMlInsServiceImpl implements AutoMlInsService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean terminateAutoMlIns(Long id) { |
|
|
|
public boolean terminateAutoMlIns(Long id) throws Exception { |
|
|
|
AutoMlIns autoMlIns = autoMlInsDao.queryById(id); |
|
|
|
if (autoMlIns == null) { |
|
|
|
throw new IllegalStateException("实验实例未查询到,id: " + id); |
|
|
|
@@ -172,7 +172,7 @@ public class AutoMlInsServiceImpl implements AutoMlInsService { |
|
|
|
} |
|
|
|
// 只有状态是"Running"时才能终止实例 |
|
|
|
if (!currentStatus.equalsIgnoreCase(Constant.Running)) { |
|
|
|
return false; // 如果不是"Running"状态,则不执行终止操作 |
|
|
|
throw new Exception("终止错误,只有运行状态的实例才能终止"); // 如果不是"Running"状态,则不执行终止操作 |
|
|
|
} |
|
|
|
|
|
|
|
// 创建请求数据map |
|
|
|
|