Skip to content

Commit

Permalink
Merge pull request #21 from bilibili/bug_fix/fix_nodesproc
Browse files Browse the repository at this point in the history
fix nodesproc
  • Loading branch information
lintanghui committed May 17, 2019
2 parents 0d90798 + a1451a0 commit 2dfe995
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,4 +1,7 @@
#### Discovery
##### Version 1.0.2
> 1.fix nodesproc. get all zone nodes.
##### Version 1.0.1
> 1.rename import path
Expand Down
3 changes: 1 addition & 2 deletions discovery/syncup.go
Expand Up @@ -107,7 +107,6 @@ func (d *Discovery) nodesproc() {
for {
arg := &model.ArgPolls{
AppID: []string{model.AppID},
Zone: d.c.Env.Zone,
Env: d.c.Env.DeployEnv,
Hostname: d.c.Env.Host,
LatestTimestamp: []int64{lastTs},
Expand All @@ -132,7 +131,7 @@ func (d *Discovery) nodesproc() {
for _, addr := range in.Addrs {
u, err := url.Parse(addr)
if err == nil && u.Scheme == "http" {
if in.Zone == arg.Zone {
if in.Zone == d.c.Env.Zone {
nodes = append(nodes, u.Host)
} else {
zones[in.Zone] = append(zones[in.Zone], u.Host)
Expand Down

0 comments on commit 2dfe995

Please sign in to comment.