Sfoglia il codice sorgente

待发布内容重新同步删除过滤缓存

wangyunpeng 13 ore fa
parent
commit
994ce854d9

+ 4 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/XxlJobService.java

@@ -1069,6 +1069,9 @@ public class XxlJobService {
                                 , cnt > 0 ? newAuditIds : null);
                     }
                     savePublishContentCache(contentList, account.getPlanId(), account.getAccountId(), findAll, now);
+                    String redisKey = "ContentPreFilterJob:" + DateUtils.getCurrentDateStr("yyyyMMdd") + ":"
+                            + account.getPlanId() + "-" + account.getAccountId();
+                    doPreFilter(account, redisKey, 0, null);
                 } finally {
                     cdl.countDown();
                 }
@@ -1228,6 +1231,7 @@ public class XxlJobService {
     private void doPreFilter(PublishPlanAccountDTO item, String redisKey, Integer finalIndex, CountDownLatch cdl) {
         boolean success = false;
         try {
+            redisTemplate.delete(redisKey);
             preFilter(item, redisKey, finalIndex);
             success = true;
         } catch (Exception e) {