|
@@ -227,15 +227,16 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
|
|
|
videoStable.setStartTime(new Date());
|
|
videoStable.setStartTime(new Date());
|
|
|
|
|
|
|
|
+ videoStable.setStatus(BizConstant.VideoStatus.RUNNING);
|
|
|
|
+ updateById(videoStable);
|
|
|
|
+
|
|
boolean flag = sendMsg(videoStable);
|
|
boolean flag = sendMsg(videoStable);
|
|
- if (flag) {
|
|
|
|
- videoStable.setStatus(BizConstant.VideoStatus.RUNNING);
|
|
|
|
- } else {
|
|
|
|
- videoStable.setEndTime(new Date());
|
|
|
|
|
|
+ if (!flag) {
|
|
videoStable.setStatus(BizConstant.VideoStatus.FAILED);
|
|
videoStable.setStatus(BizConstant.VideoStatus.FAILED);
|
|
|
|
+ updateById(videoStable);
|
|
|
|
+ return CommonResult.fail("start video_stable failed");
|
|
}
|
|
}
|
|
|
|
|
|
- updateById(videoStable);
|
|
|
|
return CommonResult.success("start video_stable success");
|
|
return CommonResult.success("start video_stable success");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -270,7 +271,11 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
videoStable.setLog(msg);
|
|
videoStable.setLog(msg);
|
|
videoStable.setStatus("200".equals(status) ? BizConstant.VideoStatus.END : BizConstant.VideoStatus.FAILED);
|
|
videoStable.setStatus("200".equals(status) ? BizConstant.VideoStatus.END : BizConstant.VideoStatus.FAILED);
|
|
videoStable.setEndTime(new Date());
|
|
videoStable.setEndTime(new Date());
|
|
- videoStable.setCostSecond((videoStable.getEndTime().getTime() - videoStable.getStartTime().getTime()) / 1000);
|
|
|
|
|
|
+ try {
|
|
|
|
+ videoStable.setCostSecond((videoStable.getEndTime().getTime() - videoStable.getStartTime().getTime()) / 1000);
|
|
|
|
+ }catch(Exception e) {
|
|
|
|
+ videoStable.setCostSecond(null);
|
|
|
|
+ }
|
|
updateById(videoStable);
|
|
updateById(videoStable);
|
|
return CommonResult.success();
|
|
return CommonResult.success();
|
|
}
|
|
}
|
|
@@ -309,7 +314,7 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
|
|
+ /**
|
|
* 递归统计文件夹中的文件数量
|
|
* 递归统计文件夹中的文件数量
|
|
*
|
|
*
|
|
* @param directory 文件夹对象
|
|
* @param directory 文件夹对象
|