Nit: use time.Durations instead of constants in seconds. (#7438)
Nit: use `time.Durations` instead of constants in seconds. Makes for slightly more readable code.
This commit is contained in:
@@ -152,9 +152,9 @@ func (vg *VolumeGrowth) findAndGrow(grpcDialOption grpc.DialOption, topo *Topolo
|
||||
}
|
||||
}()
|
||||
|
||||
for !topo.LastLeaderChangeTime.Add(constants.VolumePulseSeconds * 2).Before(time.Now()) {
|
||||
for !topo.LastLeaderChangeTime.Add(constants.VolumePulsePeriod * 2).Before(time.Now()) {
|
||||
glog.V(0).Infof("wait for volume servers to join back")
|
||||
time.Sleep(constants.VolumePulseSeconds / 2)
|
||||
time.Sleep(constants.VolumePulsePeriod / 2)
|
||||
}
|
||||
vid, raftErr := topo.NextVolumeId()
|
||||
if raftErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user