|
@@ -167,7 +167,7 @@ public class DataAugmentationServiceImpl extends BaseServiceImpl<DataAugmentatio
|
|
|
}
|
|
|
|
|
|
DataAugmentation dataAugmentation = MapstructUtils.convert(dataAugmentationBo, DataAugmentation.class);
|
|
|
- dataAugmentation.setStatus(BizConstant.VideoStatus.NOT_START);
|
|
|
+ dataAugmentation.setStatus(BizConstant.ModelStatus.NOT_START);
|
|
|
|
|
|
return this.save(dataAugmentation);// 使用全局配置的雪花算法主键生成器生成ID值
|
|
|
}
|
|
@@ -250,9 +250,8 @@ public class DataAugmentationServiceImpl extends BaseServiceImpl<DataAugmentatio
|
|
|
dataAugmentation.setInputPath(inputPath.toString());
|
|
|
dataAugmentation.setAlgorithmPath(logPath.toString());
|
|
|
dataAugmentation.setOutputPath(outputPath.toString());
|
|
|
- dataAugmentation.setStartTime(new Date());
|
|
|
- dataAugmentation.setStatus(BizConstant.VideoStatus.RUNNING);
|
|
|
- updateById(dataAugmentation);
|
|
|
+// dataAugmentation.setStatus(BizConstant.ModelStatus.RUNNING);
|
|
|
+// updateById(dataAugmentation);
|
|
|
SysDictDataBo sysDictDataBo = new SysDictDataBo();
|
|
|
sysDictDataBo.setDictLabel(dataAugmentation.getTaskType() + "开始url");
|
|
|
sysDictDataBo.setDictType("biz_data_augmentation");
|
|
@@ -270,13 +269,16 @@ public class DataAugmentationServiceImpl extends BaseServiceImpl<DataAugmentatio
|
|
|
transmissionObject.setResultPath(dataAugmentation.getOutputPath());
|
|
|
transmissionObject.setOtherParams(dataAugmentation.getHyperparameterConfiguration());
|
|
|
HttpResponseEntity responseEntity = sendPostMsg(data_augmentation_start_url, transmissionObject);
|
|
|
+ if (responseEntity != null && responseEntity.getStatus() == 200) {
|
|
|
|
|
|
- if (responseEntity.getStatus() == 200) {
|
|
|
- dataAugmentation.setStatus(BizConstant.VideoStatus.FAILED);
|
|
|
+ dataAugmentation.setStartTime(new Date());
|
|
|
+ dataAugmentation.setStatus(BizConstant.ModelStatus.RUNNING);
|
|
|
updateById(dataAugmentation);
|
|
|
return CommonResult.success("任务开始成功,请等待完成");
|
|
|
}
|
|
|
else {
|
|
|
+ dataAugmentation.setStatus(BizConstant.ModelStatus.FAILED);
|
|
|
+ updateById(dataAugmentation);
|
|
|
return CommonResult.fail("任务开始失败,请检查算法服务!");
|
|
|
}
|
|
|
} catch (IOException e) {
|
|
@@ -319,7 +321,7 @@ public class DataAugmentationServiceImpl extends BaseServiceImpl<DataAugmentatio
|
|
|
String msg = dataAugmentationStartResultBo.getMsg();
|
|
|
DataAugmentation dataAugmentation = getById(id);
|
|
|
dataAugmentation.setLog(msg);
|
|
|
- dataAugmentation.setStatus("200".equals(status) ? BizConstant.VideoStatus.END : BizConstant.VideoStatus.FAILED);
|
|
|
+ dataAugmentation.setStatus("200".equals(status) ? BizConstant.ModelStatus.END : BizConstant.ModelStatus.FAILED);
|
|
|
dataAugmentation.setEndTime(new Date());
|
|
|
try {
|
|
|
dataAugmentation.setCostSecond((dataAugmentation.getEndTime().getTime() - dataAugmentation.getStartTime().getTime()) / 1000);
|
|
@@ -382,7 +384,7 @@ public class DataAugmentationServiceImpl extends BaseServiceImpl<DataAugmentatio
|
|
|
transmissionObject.setBizType(dataAugmentation.getTaskType());
|
|
|
HttpResponseEntity responseEntity = sendPostMsg(data_augmentation_stop_url, transmissionObject);
|
|
|
if (ObjectUtil.isNotNull(responseEntity) && responseEntity.getStatus() == 200) {
|
|
|
- dataAugmentation.setStatus(BizConstant.VideoStatus.INTERRUPTED);
|
|
|
+ dataAugmentation.setStatus(BizConstant.ModelStatus.INTERRUPTED);
|
|
|
updateById(dataAugmentation);
|
|
|
return CommonResult.success("终止任务成功");
|
|
|
} else {
|