misc: Fix typos and spelling errors
This commit is contained in:
@@ -84,7 +84,7 @@ func MaxCount(maxCount int) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// ReuseLease specifies whether we should try and re-use the lease between runs.
|
||||
// ReuseLease specifies whether we should try and reuse the lease between runs.
|
||||
// Ordinarily it would get discarded with each new version (deploy) of the code.
|
||||
func ReuseLease(reuseLease bool) Option {
|
||||
return func(so *schedulerOptions) {
|
||||
|
||||
@@ -72,7 +72,7 @@ func (obj *rrStrategy) Schedule(hostnames map[string]string, opts *schedulerOpti
|
||||
}
|
||||
}
|
||||
|
||||
// remove any hosts we previouly knew about from the list
|
||||
// remove any hosts we previously knew about from the list
|
||||
for ix := len(obj.hosts) - 1; ix >= 0; ix-- {
|
||||
if !util.StrInList(obj.hosts[ix], sortedHosts) {
|
||||
// delete entry at this index
|
||||
|
||||
@@ -146,8 +146,8 @@ func Schedule(client *etcd.Client, path string, hostname string, opts ...Option)
|
||||
|
||||
sessionOptions := []concurrency.SessionOption{}
|
||||
|
||||
// here we try to re-use lease between multiple runs of the code
|
||||
// TODO: is it a good idea to try and re-use the lease b/w runs?
|
||||
// here we try to reuse lease between multiple runs of the code
|
||||
// TODO: is it a good idea to try and reuse the lease b/w runs?
|
||||
if options.reuseLease {
|
||||
if leaseID, exists := schedulerLeases[path]; exists {
|
||||
sessionOptions = append(sessionOptions, concurrency.WithLease(leaseID))
|
||||
|
||||
Reference in New Issue
Block a user