Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
filter out the allocations that arent actively running or pending
Browse files Browse the repository at this point in the history
  • Loading branch information
jvineet committed Jul 23, 2019
1 parent 709c859 commit 0109333
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/autoscale/autoscale.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ func (a *AutoScale) getJobAllocations(jobID string, policies map[string]*policy.
break
}

if !(allocs[i].ClientStatus == "running" || allocs[i].ClientStatus == "pending") {
continue
}

allocInfo, _, err := a.nomad.Allocations().Info(allocs[i].ID, nil)
if err != nil {
return out, nil, err
Expand Down

0 comments on commit 0109333

Please sign in to comment.