dengsixing před 2 roky
rodič
revize
60b1e96230

+ 1 - 1
src/main/java/com/fdkankan/download/schedule/ScheduleJob.java

@@ -23,7 +23,7 @@ public class ScheduleJob {
 
     @Scheduled(cron = "0/5 * * * * ? ")
     public void job4SceneV3Download() throws Exception {
-        sceneDownLoadService.process();
+        sceneDownLoadService.processV3();
     }
 
 }

+ 6 - 2
src/main/java/com/fdkankan/download/service/impl/SceneDownLoadServiceImpl.java

@@ -72,7 +72,7 @@ public class SceneDownLoadServiceImpl implements ISceneDownLoadService {
             if(Objects.isNull(downLoadTaskBean)){
                 continue;
             }
-            handlerService.download(downLoadTaskBean);
+            handlerService.downloadV3(downLoadTaskBean);
         }
 
     }
@@ -100,7 +100,11 @@ public class SceneDownLoadServiceImpl implements ISceneDownLoadService {
         //本地缓存入队
         CurrentDownloadNumUtil.addSceneNum(num, version);
         //正在下载任务入队
-        redisUtil.lLeftPush(RedisKey.SCENE_V3_DOWNLOAD_ING, num);
+        String downloadingKey = RedisKey.SCENE_DOWNLOAD_ING;
+        if("v3".equals(version)){
+            downloadingKey = RedisKey.SCENE_V3_DOWNLOAD_ING;
+        }
+        redisUtil.lLeftPush(downloadingKey, num);
         return downLoadTaskBean;
     }
 

+ 1 - 1
src/main/java/com/fdkankan/download/service/impl/SceneDownloadHandlerServiceImpl.java

@@ -193,7 +193,7 @@ public class SceneDownloadHandlerServiceImpl {
                 //本地正在下载任务出队
                 CurrentDownloadNumUtil.removeSceneNum(num, "v3");
                 //删除正在下载任务
-                redisUtil.lRemove(RedisKey.SCENE_DOWNLOAD_ING, 1, num);
+                redisUtil.lRemove(RedisKey.SCENE_V3_DOWNLOAD_ING, 1, num);
             }
         }
     }