From f79a0584fe36833921bf08f0bb00e1c8e1669d7b Mon Sep 17 00:00:00 2001 From: eson <474420502@qq.com> Date: Mon, 13 Nov 2023 22:35:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E4=B8=80=E7=9B=B4?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index 65883a7..8b66b0a 100644 --- a/main.go +++ b/main.go @@ -138,6 +138,13 @@ func StartNode(cfg *ConfigServer) { // 设置共享的参数 DequeueHandler.WithShared(nh) + 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) os.Exit(1)