MCPcopy Index your code
hub / github.com/cloudtty/cloudtty / tryScaleInWorkerQueue

Method tryScaleInWorkerQueue

pkg/workerpool/worker_pool.go:288–298  ·  view source on GitHub ↗
(stop <-chan struct{})

Source from the content-addressed store, hash-verified

286}
287
288func (w *WorkerPool) tryScaleInWorkerQueue(stop <-chan struct{}) {
289 t := time.NewTicker(w.scaleInQueueDuration)
290 for {
291 select {
292 case <-t.C:
293 w.scaleInWorkerQueue()
294 case <-stop:
295 return
296 }
297 }
298}
299
300func (w *WorkerPool) scaleInWorkerQueue() {
301 workers, err := w.podLister.List(labels.Set{constants.WorkerOwnerLabelKey: ""}.AsSelector())

Callers 1

runMethod · 0.95

Calls 1

scaleInWorkerQueueMethod · 0.95

Tested by

no test coverage detected