فهرست منبع

修改重试次数

xueyiming 4 روز پیش
والد
کامیت
889b56137c

+ 2 - 3
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/NewMatchVideoServiceImpl.java

@@ -49,8 +49,7 @@ public class NewMatchVideoServiceImpl implements NewMatchVideoService {
     @Autowired
     private LongArticlesTextMapper longArticlesTextMapper;
 
-    @Autowired
-    private AigcService aigcService;
+    private static final Integer retryCountMax = 3;
 
 
     @Transactional
@@ -122,7 +121,7 @@ public class NewMatchVideoServiceImpl implements NewMatchVideoService {
             retryCount = 0;
         } else {
             retryCount++;
-            newStatus = (retryCount > 3)
+            newStatus = (retryCount >= retryCountMax)
                     ? failStatus.getStatusCode()
                     : video.getContentStatus();
         }