浏览代码

修改等待时间

xueyiming 1 月之前
父节点
当前提交
996b50bbf0

+ 4 - 4
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CoreServiceImpl.java

@@ -339,8 +339,8 @@ public class CoreServiceImpl implements CoreService {
                     log.info("启动匹配小程序线程");
                     while (true) {
                         try {
-                            // 超过 5 分钟没有数据,销毁当前线程
-                            MatchContent matchContent = matchQueue.poll(5, TimeUnit.MINUTES); // 等待最多 5 分钟
+                            // 超过 2 分钟没有数据,销毁当前线程
+                            MatchContent matchContent = matchQueue.poll(2, TimeUnit.MINUTES); // 等待最多 2 分钟
                             if (matchContent == null) {
                                 break; // 退出当前线程
                             }
@@ -590,8 +590,8 @@ public class CoreServiceImpl implements CoreService {
                     log.info("启动核心操作线程");
                     while (true) {
                         try {
-                            // 超过 5 分钟没有数据,销毁当前线程
-                            PlanAccount planAccount = coreQueue.poll(5, TimeUnit.MINUTES); // 等待最多 5 分钟
+                            // 超过 2 分钟没有数据,销毁当前线程
+                            PlanAccount planAccount = coreQueue.poll(2, TimeUnit.MINUTES); // 等待最多 2 分钟
                             if (planAccount == null) {
                                 break; // 退出当前线程
                             }

+ 6 - 6
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/MatchVideoServiceImpl.java

@@ -155,8 +155,8 @@ public class MatchVideoServiceImpl {
                     log.info("启动Kimi搜索线程");
                     while (true) {
                         try {
-                            // 超过 5 分钟没有数据,销毁当前线程
-                            MatchVideo matchVideo = matchKimiVideoQueue.poll(5, TimeUnit.MINUTES); // 等待最多 5 分钟
+                            // 超过 2 分钟没有数据,销毁当前线程
+                            MatchVideo matchVideo = matchKimiVideoQueue.poll(2, TimeUnit.MINUTES); // 等待最多 2 分钟
                             log.info("matchKimiVideoQueue size={}", matchKimiVideoQueue.size());
                             if (matchVideo == null) {
                                 break; // 退出当前线程
@@ -373,8 +373,8 @@ public class MatchVideoServiceImpl {
                     log.info("启动匹配小程序线程");
                     while (true) {
                         try {
-                            // 超过 5 分钟没有数据,销毁当前线程
-                            MatchVideo matchVideo = matchCrawlerVideoQueue.poll(5, TimeUnit.MINUTES); // 等待最多 5 分钟
+                            // 超过 2 分钟没有数据,销毁当前线程
+                            MatchVideo matchVideo = matchCrawlerVideoQueue.poll(2, TimeUnit.MINUTES); // 等待最多 2 分钟
                             log.info("matchCrawlerVideoQueue size={}", matchCrawlerVideoQueue.size());
                             if (matchVideo == null) {
                                 break; // 退出当前线程
@@ -492,8 +492,8 @@ public class MatchVideoServiceImpl {
                     log.info("启动上传小程序视频线程");
                     while (true) {
                         try {
-                            // 超过 5 分钟没有数据,销毁当前线程
-                            MatchVideo matchVideo = uploadCrawlerVideoQueue.poll(5, TimeUnit.MINUTES); // 等待最多 5 分钟
+                            // 超过 2 分钟没有数据,销毁当前线程
+                            MatchVideo matchVideo = uploadCrawlerVideoQueue.poll(2, TimeUnit.MINUTES); // 等待最多 2 分钟
                             log.info("uploadCrawlerVideoQueue size={}", uploadCrawlerVideoQueue.size());
                             if (matchVideo == null) {
                                 break; // 退出当前线程