Skip to content

Commit

Permalink
Merge branch 'v3.2.x' of https://github.com/Tencent/bk-cmdb into v3.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
breezelxp committed Feb 26, 2020
2 parents e543ed0 + adad603 commit 90d9a93
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/scene_server/datacollection/datacollection/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,14 @@ func (d *Discover) subChan() {
if nil != err {
d.interrupt <- err
blog.Errorf("subscribe [%s] failed: %s", d.chanName, err.Error())
return
}

defer func() {
subChan.Unsubscribe(d.chanName)
d.isSubing = false
blog.Infof("close subscribe channel: %s", d.chanName)
_ = subChan.Close()
}()

var ts = time.Now()
Expand All @@ -244,7 +246,7 @@ func (d *Discover) subChan() {

blog.Warnf("receive message err: %s", err.Error())
d.interrupt <- err
continue
return
}

msg, ok := received.(*redis.Message)
Expand Down
14 changes: 8 additions & 6 deletions src/scene_server/datacollection/datacollection/hostsnap.go
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,10 @@ func (h *HostSnap) subChan(snapcli *redis.Client, chanName []string) {
subChan, err := snapcli.Subscribe(chanName...)
if nil != err {
h.interrupt <- err
blog.Error("subscribe channel faile ", err.Error())
blog.Errorf("subscribe channel failed %s", err.Error())
return
}
defer subChan.Close()
closeChan := make(chan struct{})
go h.healthCheck(closeChan)
defer func() {
Expand All @@ -559,13 +561,13 @@ func (h *HostSnap) subChan(snapcli *redis.Client, chanName []string) {
if err == redis.Nil || err == io.EOF {
continue
}
msg, ok := received.(*redis.Message)
if !ok {
continue
}
if nil != err {
blog.Debug("receive messave err", err.Error())
blog.Debug("receive message err", err.Error())
h.interrupt <- err
return
}
msg, ok := received.(*redis.Message)
if !ok {
continue
}

Expand Down
7 changes: 6 additions & 1 deletion src/ui/src/views/hosts/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,9 @@
.hosts-table{
margin-top: 20px;
}
</style>
.filter-field /deep/ {
.bk-selector-list {
z-index: 300;
}
}
</style>

0 comments on commit 90d9a93

Please sign in to comment.