From 2b1f542577dd8dfc54d3433dff3615796ceab0af Mon Sep 17 00:00:00 2001 From: shikeying <shikeying@163.com> Date: 星期二, 11 十月 2022 17:17:50 +0800 Subject: [PATCH] 视频下载,解析分析调度跑通 --- recommend-video/src/main/java/com/iplatform/recvideo/SimilarExecutor.java | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/recommend-video/src/main/java/com/iplatform/recvideo/SimilarExecutor.java b/recommend-video/src/main/java/com/iplatform/recvideo/SimilarExecutor.java index 3e94ddd..61d1450 100644 --- a/recommend-video/src/main/java/com/iplatform/recvideo/SimilarExecutor.java +++ b/recommend-video/src/main/java/com/iplatform/recvideo/SimilarExecutor.java @@ -4,6 +4,7 @@ import com.iplatform.recvideo.util.PythonInvokeUtils; import com.iplatform.recvideo.util.TestUtils; import com.iplatform.recvideo.util.VideoFileUtils; +import com.walker.infrastructure.utils.FileUtils; import com.walker.infrastructure.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -84,7 +85,14 @@ public int execute() throws Exception{ if(!this.pythonLoadVideoDone){ logger.debug("褰撳墠 pythonLoadVideoDone = false, 闇�瑕佹煡璇㈡暟鎹簱鏄惁宸插姞杞借棰�"); - this.pythonLoadVideoDone = this.pythonLoadVideoDone(this.batchId, VideoFileUtils.combineBatchPath(videoDataFolder, batchId)); + String batchPath = VideoFileUtils.combineBatchPath(videoDataFolder, batchId); + if(!FileUtils.isExist(batchPath)){ + // 鏂囦欢澶逛笉瀛樺湪锛屾垨鐣ヨ鐘舵�佽褰曪紝2022-10-11 + this.ignoreTaskStatus(batchId); + logger.warn("鏂囦欢澶逛笉瀛樺湪锛屽拷鐣ヨ鎵规璁板綍锛岃嚜鍔ㄦ洿鏂颁负'宸插畬鎴�', batchPath = " + batchPath); + return 1; + } + this.pythonLoadVideoDone = this.pythonLoadVideoDone(this.batchId, batchPath); } // 1: 濡傛灉瑙嗛杩樻湭鍔犺浇锛屽垯鍏堝姞杞借棰� @@ -114,9 +122,13 @@ } } if(StringUtils.isEmptyList(this.videoFolderInfoList)){ - logger.warn("瑙嗛鍒嗘瀽鏂囦欢澶瑰唴瀹逛负绌猴紝鏃犳硶缁х画鏌ヨ鐩镐技搴︾粨鏋�! videoFolderInfoList = null"); - return -1; + logger.warn("瑙嗛鍒嗘瀽鏂囦欢澶瑰唴瀹逛负绌猴紝鏃犳硶缁х画鏌ヨ鐩镐技搴︾粨鏋�!蹇界暐璇ユ壒娆°�� videoFolderInfoList = null"); +// return -1; + // 鏂囦欢澶逛笉娌℃湁浠讳綍瑙嗛鏂囦欢锛屾垨鐣ヨ鐘舵�佽褰曪紝2022-10-11 + this.ignoreTaskStatus(batchId); + return 1; } + for(VideoFolderInfo v : this.videoFolderInfoList){ this.videoIdList.add(v.getVideoId()); } @@ -246,4 +258,11 @@ * @param recVideoIdList 鏈壒娆″鐞嗗師濮嬭棰慽d闆嗗悎 */ protected abstract void writeRcVideoUser(String batchId, List<String> recVideoIdList); + + /** + * 蹇界暐璇ョ姸鎬佹壒娆★紝鐢变簬鏂囦欢澶逛笉瀛樺湪绛夊師鍥狅紝涓嶅甫澶勭悊锛屼笉瑕佸湪杩欓噷鎵撲即銆� + * @param batchId + * @date 2022-10-11 + */ + protected abstract void ignoreTaskStatus(String batchId); } -- Gitblit v1.9.1