Skip to content

Commit

Permalink
Merge pull request #73 from victorcoder/fix-gone-member
Browse files Browse the repository at this point in the history
Fixes node processing with wrong status
  • Loading branch information
Victor Castell committed Feb 11, 2016
2 parents 0bf63b7 + e7a4888 commit 2620458
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dkron/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,10 +763,12 @@ func (a *AgentCommand) processFilteredNodes(job *Job) ([]string, map[string]stri
}

for _, member := range a.serf.Members() {
for mtk, mtv := range member.Tags {
if mtk == jtk && mtv == tv {
if len(nodes) < count {
nodes = append(nodes, member.Name)
if member.Status == serf.StatusAlive {
for mtk, mtv := range member.Tags {
if mtk == jtk && mtv == tv {
if len(nodes) < count {
nodes = append(nodes, member.Name)
}
}
}
}
Expand Down

0 comments on commit 2620458

Please sign in to comment.