MCPcopy Index your code
hub / github.com/ddev/ddev / WaitByLabels

Method WaitByLabels

pkg/ddevapp/ddevapp.go:3053–3060  ·  view source on GitHub ↗

WaitByLabels waits for containers found by list of labels to be ready

(labels map[string]string)

Source from the content-addressed store, hash-verified

3051// WaitByLabels waits for containers found by list of labels to be
3052// ready
3053func (app *DdevApp) WaitByLabels(labels map[string]string) error {
3054 waitTime := app.GetMaxContainerWaitTime()
3055 err := dockerutil.ContainersWait(waitTime, labels)
3056 if err != nil {
3057 return fmt.Errorf("container(s) failed to become healthy before their configured timeout or in %d seconds.\nThis might be a problem with the healthcheck and not a functional problem.\nThe error was '%v'", waitTime, err.Error())
3058 }
3059 return nil
3060}
3061
3062// StartAndWait is primarily for use in tests.
3063// It does app.Start() but then waits for extra seconds

Callers 2

StartMethod · 0.95
debug-rebuild.goFile · 0.80

Calls 4

ContainersWaitFunction · 0.92
ErrorfMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected