Skip to content

Commit

Permalink
appease linter
Browse files Browse the repository at this point in the history
  • Loading branch information
notnoop committed Jan 8, 2019
1 parent 01fd085 commit d19245f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions helper/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,4 @@ func FormatFloat(f float64, maxPrec int) string {
}

return v[:sublen]

return v
}
4 changes: 2 additions & 2 deletions scheduler/preemption.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (p *Preemptor) SetPreemptions(allocs []*structs.Allocation) {

// Initialize counts
for _, alloc := range allocs {
id := structs.NamespacedID{alloc.JobID, alloc.Namespace}
id := structs.NewNamespacedID(alloc.JobID, alloc.Namespace)
countMap, ok := p.currentPreemptions[id]
if !ok {
countMap = make(map[string]int)
Expand All @@ -173,7 +173,7 @@ func (p *Preemptor) SetPreemptions(allocs []*structs.Allocation) {
// getNumPreemptions counts the number of other allocations being preempted that match the job and task group of
// the alloc under consideration. This is used as a scoring factor to minimize too many allocs of the same job being preempted at once
func (p *Preemptor) getNumPreemptions(alloc *structs.Allocation) int {
c, ok := p.currentPreemptions[structs.NamespacedID{alloc.JobID, alloc.Namespace}][alloc.TaskGroup]
c, ok := p.currentPreemptions[structs.NewNamespacedID(alloc.JobID, alloc.Namespace)][alloc.TaskGroup]
if !ok {
return 0
}
Expand Down

0 comments on commit d19245f

Please sign in to comment.