模型服务状态修改

This commit is contained in:
limin 2025-01-05 14:16:40 +08:00
parent f47bdb372e
commit 4926ca7544
2 changed files with 4 additions and 5 deletions

View File

@ -22,6 +22,8 @@ public class AsyncModelServiceService {
public void startModelService(ModelServiceDO updateObj) {
try {
Thread.sleep(30000);
updateObj.setStatus(2);
modelServiceMapper.updateById(updateObj);
}catch(Exception e){
updateObj.setStatus(5);
modelServiceMapper.updateById(updateObj);
@ -33,6 +35,8 @@ public class AsyncModelServiceService {
public void stopModelService(ModelServiceDO updateObj) {
try {
Thread.sleep(30000);
updateObj.setStatus(3);
modelServiceMapper.updateById(updateObj);
}catch(Exception e){
updateObj.setStatus(5);
modelServiceMapper.updateById(updateObj);

View File

@ -95,9 +95,6 @@ public class ModelServiceServiceImpl implements ModelServiceService {
//todo 开启模型服务
asyncModelServiceService.startModelService(updateObj);
updateObj.setStatus(2);
modelServiceMapper.updateById(updateObj);
}
@Override
@ -109,8 +106,6 @@ public class ModelServiceServiceImpl implements ModelServiceService {
//todo 关闭模型服务
asyncModelServiceService.stopModelService(updateObj);
/* updateObj.setStatus(3);
modelServiceMapper.updateById(updateObj);*/
}