Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>
type pool interface {
scheduler.WorkerPool
Instances() []worker.InstanceView
+ Stop()
}
type dispatcher struct {
func (disp *dispatcher) run() {
defer close(disp.stopped)
defer disp.instanceSet.Stop()
+ defer disp.pool.Stop()
staleLockTimeout := time.Duration(disp.Cluster.Dispatch.StaleLockTimeout)
if staleLockTimeout == 0 {
timeoutBooting: duration(cluster.CloudVMs.TimeoutBooting, defaultTimeoutBooting),
timeoutProbe: duration(cluster.CloudVMs.TimeoutProbe, defaultTimeoutProbe),
timeoutShutdown: duration(cluster.CloudVMs.TimeoutShutdown, defaultTimeoutShutdown),
+ stop: make(chan bool),
}
wp.registerMetrics(reg)
go func() {