From 68787ed426dd0b4d4d6fa46c5b7eeca33674cd46 Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Mon, 13 Nov 2023 23:15:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=91=E4=B8=80=E6=99=9A=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 5f403f7..0b910ff 100644 --- a/main.go +++ b/main.go @@ -138,13 +138,12 @@ func StartNode(cfg *ConfigServer) { // 设置共享的参数 DequeueHandler.WithShared(nh) - // go func() { - // for DequeueHandler != nil { - // DequeueHandler.Notify(DequeueHandler.NULL) - // log.Println("DequeueHandler 触发") - // time.Sleep(time.Second * 5) - // } - // }() + go func() { + for DequeueHandler != nil { + DequeueHandler.Notify(DequeueHandler.NULL) + time.Sleep(time.Second * 5) + } + }() if err := nh.StartReplica(initialMembers, false, NewSMQueue, rc); err != nil { fmt.Fprintf(os.Stderr, "failed to add cluster, %v\n", err)