From b36a36172bde505f12cb661d4ef17f03fcea63f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Tue, 23 Aug 2022 14:53:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/node.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/nodes/node.go b/internal/nodes/node.go index 7ee4791..ec19c61 100644 --- a/internal/nodes/node.go +++ b/internal/nodes/node.go @@ -115,9 +115,6 @@ func (this *Node) Start() { if err != nil { remotelogs.Error("NODE", "initialize ip library failed: "+err.Error()) } - goman.New(func() { - iplib.NewUpdater(NewIPLibraryUpdater(), 10*time.Minute).Start() - }) // 检查硬盘类型 this.checkDisk() @@ -157,7 +154,12 @@ func (this *Node) Start() { // 启动同步计时器 this.startSyncTimer() - // 状态变更计时器 + // 更新IP库 + goman.New(func() { + iplib.NewUpdater(NewIPLibraryUpdater(), 10*time.Minute).Start() + }) + + // 监控节点运行状态 goman.New(func() { NewNodeStatusExecutor().Listen() })