mirror of
https://github.com/kemko/nomad.git
synced 2026-01-09 11:55:42 +03:00
Use the correctly typed rand.Int* variant
This commit is contained in:
@@ -348,7 +348,7 @@ func (b *EvalBroker) scanForSchedulers(schedulers []string) (*structs.Evaluation
|
||||
default:
|
||||
// Multiple tasks. We pick a random task so that we fairly
|
||||
// distribute work.
|
||||
offset := rand.Int63n(n)
|
||||
offset := rand.Intn(n)
|
||||
return b.dequeueForSched(eligibleSched[offset])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ func (s *Server) forwardRegion(region, method string, args interface{}, reply in
|
||||
}
|
||||
|
||||
// Select a random addr
|
||||
offset := rand.Int31n(len(servers))
|
||||
offset := rand.Intn(len(servers))
|
||||
server := servers[offset]
|
||||
s.peerLock.RUnlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user