Skip to content

Commit

Permalink
fea: 修复检查选举服务
Browse files Browse the repository at this point in the history
  • Loading branch information
cyz-home committed Sep 6, 2023
1 parent 1fa2bc1 commit d906d9c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bootstrap/servers/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ func (k *Election) Run() {
func (k *Election) Exit() {
if k.isRunNode {
k.Connect.Client.Del(context.Background(), k.key)
}

if app.HasBean("queue") && k.isRunNode {
// 广播到其他副本
NewQueue().Publish(message.ElectionClose{
Time: time.Now().Unix(),
})
if app.HasBean("queue") {
// 广播到其他副本
NewQueue().Publish(message.ElectionClose{
Time: time.Now().Unix(),
})
}
}
}

Expand Down

0 comments on commit d906d9c

Please sign in to comment.