MCPcopy Create free account
hub / github.com/cloudbase/garm / waitForErrorGroupOrContextCancelled

Method waitForErrorGroupOrContextCancelled

runner/pool/pool.go:887–904  ·  view source on GitHub ↗
(g *errgroup.Group)

Source from the content-addressed store, hash-verified

885}
886
887func (r *basePoolManager) waitForErrorGroupOrContextCancelled(g *errgroup.Group) error {
888 if g == nil {
889 return nil
890 }
891
892 done := make(chan error, 1)
893 go func() {
894 waitErr := g.Wait()
895 done <- waitErr
896 }()
897
898 select {
899 case err := <-done:
900 return err
901 case <-r.ctx.Done():
902 return r.ctx.Err()
903 }
904}
905
906func (r *basePoolManager) setInstanceRunnerStatus(runnerName string, status params.RunnerStatus) (params.Instance, error) {
907 updateParams := params.UpdateInstanceParams{

Callers 6

scaleDownOnePoolMethod · 0.95
retryFailedInstancesMethod · 0.95
scaleDownMethod · 0.95
ensureMinIdleRunnersMethod · 0.95

Calls 2

WaitMethod · 0.65
DoneMethod · 0.45

Tested by

no test coverage detected