Browse Source

update 优化 有界队列销毁方式 应该使用特殊销毁方法

疯狂的狮子Li 5 months ago
parent
commit
87294b41af

+ 1 - 1
ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/QueueUtils.java

@@ -179,7 +179,7 @@ public class QueueUtils {
     public static <T> boolean trySetBoundedQueueCapacity(String queueName, int capacity, boolean destroy) {
         RBoundedBlockingQueue<T> boundedBlockingQueue = CLIENT.getBoundedBlockingQueue(queueName);
         if (destroy) {
-            destroyQueue(queueName);
+            boundedBlockingQueue.delete();
         }
         return boundedBlockingQueue.trySetCapacity(capacity);
     }