Skip to content

Commit

Permalink
调整:没有添加Job时,不向服务端注册
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Aug 28, 2024
1 parent c8861b5 commit 1f1aed6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions registryJob.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ func RegistryJob() {
// 清空消息通知
registerNotify = make(chan struct{}, 100)

// 注册
err := defaultClient.RegistryClient()
flog.ErrorIfExists(err)
// 注册(没有添加Job时,不向服务端注册)
if defaultClient.ClientJobs.Count() > 0 {
err := defaultClient.RegistryClient()
flog.ErrorIfExists(err)
}
}
}

0 comments on commit 1f1aed6

Please sign in to comment.