From 3adff2c549121bc166f49aa8de681265cd87b2d9 Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期四, 19 六月 2025 09:49:09 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/cache/MessageQueue.java |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/zy/core/cache/MessageQueue.java b/src/main/java/com/zy/core/cache/MessageQueue.java
index cf6e475..7c63158 100644
--- a/src/main/java/com/zy/core/cache/MessageQueue.java
+++ b/src/main/java/com/zy/core/cache/MessageQueue.java
@@ -62,7 +62,6 @@
      * 濡傛灉鍙戠幇闃熷垪宸叉弧鏃犳硶娣诲姞鐨勮瘽锛屼細鐩存帴杩斿洖false銆�
      */
     public static boolean offer(SlaveType type, Integer id, Task task) {
-        CommandUtils.offer(type, id, task);
         switch (type) {
             case Crn:
                 return CRN_EXCHANGE.get(id).offer(task);
@@ -151,5 +150,20 @@
                 break;
         }
     }
+    public static boolean offer(SlaveType type, Integer devpId, Task task, Runnable callback) {
+        boolean result = offer(type, devpId, task); // 鍏堟墽琛屽師鏈変换鍔¢�昏緫
+        if (result && callback != null) {
+            new Thread(() -> {
+                try {
+                    Thread.sleep(200); // 妯℃嫙浠诲姟鎵ц鏃堕棿
+                    callback.run();
+                } catch (InterruptedException e) {
+                    Thread.currentThread().interrupt();
+                }
+            }).start();
+        }
+        return result;
+    }
+
 
 }

--
Gitblit v1.9.1