Browse Source

reduce logs

sunyj 7 năm trước cách đây
mục cha
commit
36c3af5936

+ 4 - 1
src/main/java/com/uas/ps/product/sync/MessageConsumer.java

@@ -92,7 +92,10 @@ public class MessageConsumer {
         int count = 0;
         while (count < MAX_WAIT_TIMES) {
             count++;
-            logger.info("waiting batchCode: " + batchCode + " for " + count + " times");
+            // 每等待 50 次打印一次
+            if(count % 50 == 1){
+                logger.info("waiting batchCode: " + batchCode + " for " + count + " times");
+            }
             if (batchCodes.contains(batchCode)) {
                 logger.info("waited batchCode: " + batchCode);
                 batchCodes.remove(batchCode);