| | |
| | | this.consumerExecutor.execute(() -> { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | Thread.sleep(30); |
| | | Thread.sleep(10); |
| | | List<UnlockPathTask> tasks = new ArrayList<>(); |
| | | // if unlockTaskQueue was empty, then block |
| | | tasks.add(unlockTaskQueue.take()); |
| | |
| | | if (tasks.size() == 1) { |
| | | resetCodeIdxList = this.getResetCodeList(lev, tasks.get(0)); |
| | | } else if (tasks.size() > 1) { |
| | | log.info("consumer task count:{}", tasks.size()); |
| | | // log.info("consumer task count:{}", tasks.size()); |
| | | resetCodeIdxList = this.getResetCodeList(lev,tasks); |
| | | } |
| | | |
| | |
| | | this.dealResetCodeList(lev, resetCodeIdxList); |
| | | } |
| | | |
| | | log.info("consumer unlock path spend time:{}", System.currentTimeMillis() - startTime); |
| | | // log.info("consumer unlock path spend time:{}", System.currentTimeMillis() - startTime); |
| | | } |
| | | |
| | | } catch (InterruptedException e) { |