Browse Source

场景下载定时任务bug修复

dengsixing 3 years ago
parent
commit
027569d0de

+ 0 - 1
4dkankan-center-modeling/src/main/java/com/fdkankan/modeling/receiver/RabbitMqListener.java

@@ -331,7 +331,6 @@ public class RabbitMqListener {
                 //如果是重复计算,没有走到计算逻辑,不需要上传日志文件
                 buildLog.setLogDetailPath(prefixAli+ buildLogPath + "console.log");
             }
-            buildLog.setUpdateTime(Calendar.getInstance().getTime());
             buildLog.setBuildStatus(buildStatus.code());
             buildLog.setCameraType(Integer.parseInt(buildSceneResult.getCameraType()));
             buildLogService.updateById(buildLog);

+ 11 - 7
4dkankan-center-scene-download/src/main/java/com/fdkankan/download/service/impl/SceneDownloadHandlerServiceImpl.java

@@ -60,8 +60,8 @@ import org.springframework.web.client.RestTemplate;
 @Service
 public class SceneDownloadHandlerServiceImpl {
 
-    @Autowired
-    private PlatformUserClient platformUserClient;
+//    @Autowired
+//    private PlatformUserClient platformUserClient;
     @Autowired
     private SceneUserSceneClient sceneUserSceneClient;
 
@@ -213,17 +213,21 @@ public class SceneDownloadHandlerServiceImpl {
             String url = this.publicUrl + uploadPath;
             this.updateProgress(null, num, SceneDownloadProgressStatus.DOWNLOAD_SUCCESS.code(), url);
 
+            // TODO: 2022/5/24 v3 停止后要开启-----------------------start
             //更新用户场景已下载次数
-            platformUserClient.updateDownloadNum(userId, 1);
-
-            //更新下载log状态为成功
-            sceneUserSceneClient.updateSceneDownloadLog(num, DownloadStatus.SUCCESS.code(), url, null);
+//            platformUserClient.updateDownloadNum(userId, 1);
+//
+//            //更新下载log状态为成功
+//            sceneUserSceneClient.updateSceneDownloadLog(num, DownloadStatus.SUCCESS.code(), url, null);
+            // TODO: 2022/5/24 v3 停止后要开启-----------------------end
 
         }catch (Exception e){
             //更新进度为下载失败
             this.updateProgress( null, num, SceneDownloadProgressStatus.DOWNLOAD_FAILED.code(), null);
             //更新下载log状态为成功
-            sceneUserSceneClient.updateSceneDownloadLog(num, DownloadStatus.FAILD.code(), null, ExceptionUtil.stacktraceToString(e));
+            // TODO: 2022/5/24 v3 停止后要开启-----------------------start
+//            sceneUserSceneClient.updateSceneDownloadLog(num, DownloadStatus.FAILD.code(), null, ExceptionUtil.stacktraceToString(e));
+            // TODO: 2022/5/24 v3 停止后要开启-----------------------send
             throw e;
         }finally {
             if(StrUtil.isNotBlank(zipPath)){