Browse Source

增加推送

dsx 1 năm trước cách đây
mục cha
commit
e592c8e7d4

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

@@ -6,6 +6,7 @@ import cn.hutool.core.thread.ExecutorBuilder;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.system.HostInfo;
 import cn.hutool.system.SystemUtil;
+import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.common.constant.CommonStatus;
 import com.fdkankan.common.constant.CommonSuccessStatus;
 import com.fdkankan.common.constant.SceneSource;
@@ -110,7 +111,7 @@ public class GenSceneRunnerImpl implements CommandLineRunner {
                             threadPoolExecutor.submit(() -> {
                                 try {
                                     String zipPath = downloadService.downloadHandler(scenePlus.getNum());
-//                                    send(zipPath);
+                                    send(zipPath);
                                     downloadLogService.saveLog(scenePlus.getNum(), "kankan", CommonSuccessStatus.SUCCESS.code(), null);
                                 } catch (Exception e) {
                                     log.error("看看场景打包失败,num:{}", scenePlus.getNum(), e);
@@ -127,6 +128,8 @@ public class GenSceneRunnerImpl implements CommandLineRunner {
     }
 
     private void send(String zipPath){
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("path", zipPath);
         mqProducer.sendByWorkQueue("rsync-scene", zipPath);
     }