zhang
2025-05-20 1313906bb1eb983d3beece810035e7fc28d6a92f
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/PathQueueConsumer.java
@@ -37,23 +37,20 @@
        this.consumerExecutor.execute(() -> {
            while (!Thread.currentThread().isInterrupted()) {
                try {
                    Thread.sleep(10);
                    List<UnlockPathTask> tasks = new ArrayList<>();
                    // if unlockTaskQueue was empty, then block
//                    tasks.add(unlockTaskQueue.take());
                    tasks.add(unlockTaskQueue.take());
                    unlockTaskQueue.drainTo(tasks);
                    if (tasks.isEmpty()) {
                        Thread.sleep(30);
                    } else {
                    if (!Cools.isEmpty(tasks)) {
                        long startTime = System.currentTimeMillis();
                        List<int[]> resetCodeIdxList = null;
                        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);
                        }
@@ -61,7 +58,7 @@
                            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) {