|
@@ -456,8 +456,7 @@ public class MatchVideoServiceImpl {
|
|
|
if (lock) {
|
|
|
boolean res = crawlerVideoService.uploadCrawlerVideo(matchVideo);
|
|
|
if (res) {
|
|
|
- updateStatus(matchVideo.getId(), ContentStatusEnum.SUCCESS_3.getStatusCode());
|
|
|
- updateResultStatus(matchVideo.getContentId(), ContentResultStatusEnum.SUCCESS.getStatus());
|
|
|
+ successMatchVideo(matchVideo);
|
|
|
} else {
|
|
|
//上传失败记录
|
|
|
String countKey = String.format(UPLOAD_CRAWLER_FAIL_COUNT_KEY, matchVideo.getContentId());
|
|
@@ -478,8 +477,8 @@ public class MatchVideoServiceImpl {
|
|
|
redisLock.unlock(lockKey, lockValue);
|
|
|
}
|
|
|
} else {
|
|
|
- //更新状态为etl执行完成
|
|
|
- updateStatus(matchVideo.getId(), ContentStatusEnum.SUCCESS_3.getStatusCode());
|
|
|
+ //更新状态为etl执行完成 并更新匹配成功状态
|
|
|
+ successMatchVideo(matchVideo);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -603,6 +602,11 @@ public class MatchVideoServiceImpl {
|
|
|
updateStatus(matchVideo.getId(), ContentStatusEnum.ERROR_99.getStatusCode());
|
|
|
updateResultStatus(matchVideo.getContentId(), ContentResultStatusEnum.FAIL.getStatus());
|
|
|
}
|
|
|
+
|
|
|
+ private void successMatchVideo(MatchVideo matchVideo) {
|
|
|
+ updateStatus(matchVideo.getId(), ContentStatusEnum.SUCCESS_3.getStatusCode());
|
|
|
+ updateResultStatus(matchVideo.getContentId(), ContentResultStatusEnum.SUCCESS.getStatus());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|