|
@@ -139,6 +139,7 @@ public class MatchVideoServiceImpl {
|
|
|
try {
|
|
|
// 超过 5 分钟没有数据,销毁当前线程
|
|
|
MatchVideo matchVideo = matchKimiVideoQueue.poll(5, TimeUnit.MINUTES); // 等待最多 5 分钟
|
|
|
+ log.info("matchKimiVideoQueue size={}", matchKimiVideoQueue.size());
|
|
|
if (matchVideo == null) {
|
|
|
break; // 退出当前线程
|
|
|
}
|
|
@@ -229,6 +230,7 @@ public class MatchVideoServiceImpl {
|
|
|
String lockValue = UUID.randomUUID().toString();
|
|
|
boolean lock = redisLock.tryLock(lockKey, lockValue, 300, TimeUnit.SECONDS);
|
|
|
if (lock) {
|
|
|
+ log.info("processKimiMatchContent lock lockKey={}", lockKey);
|
|
|
boolean res = kimiService.updateKimiContent(matchVideo.getContentId());
|
|
|
if (res) {
|
|
|
updateStatus(matchVideo.getId(), ContentStatusEnum.KIMI_SUCCESS.getStatusCode());
|
|
@@ -236,9 +238,10 @@ public class MatchVideoServiceImpl {
|
|
|
LarkRobotUtil.sendMessage("kimiService updateKimiContent fail contentId=" + matchVideo.getContentId());
|
|
|
log.error("kimiService updateKimiContent fail contentId={}", matchVideo.getContentId());
|
|
|
}
|
|
|
+ log.info("processKimiMatchContent unlock lockKey={}", lockKey);
|
|
|
redisLock.unlock(lockKey, lockValue);
|
|
|
}
|
|
|
- } else {
|
|
|
+ } else if (kimiText.getKimiStatus() == 1) {
|
|
|
//更新状态为kimi执行完成
|
|
|
updateStatus(matchVideo.getId(), ContentStatusEnum.KIMI_SUCCESS.getStatusCode());
|
|
|
}
|