Browse Source

modify logs

sunyj 7 years ago
parent
commit
6a5d61a557
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/main/java/com/uas/ps/product/MessageConsumer.java

+ 2 - 3
src/main/java/com/uas/ps/product/MessageConsumer.java

@@ -79,17 +79,16 @@ public class MessageConsumer {
      * 则会出现重复消费数据的情况
      * 则会出现重复消费数据的情况
      */
      */
     public void waitResponse(String batchCode) {
     public void waitResponse(String batchCode) {
-        logger.info("waiting batchCode: " + batchCode);
         subscribe();
         subscribe();
         while (true) {
         while (true) {
+            logger.info("waiting batchCode: " + batchCode);
             if (batchCodes.contains(batchCode)) {
             if (batchCodes.contains(batchCode)) {
                 logger.info("waited batchCode: " + batchCode);
                 logger.info("waited batchCode: " + batchCode);
                 batchCodes.remove(batchCode);
                 batchCodes.remove(batchCode);
                 return;
                 return;
             }
             }
             try {
             try {
-                logger.info("sleep 1s...");
-                Thread.sleep(1000);
+                Thread.sleep(500);
             } catch (InterruptedException e) {
             } catch (InterruptedException e) {
                 logger.error("sleep error", e);
                 logger.error("sleep error", e);
             }
             }