MCPcopy
hub / github.com/grafana/dskit / waitForModulesToStop

Method waitForModulesToStop

modules/module_service.go:125–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123}
124
125func (w *moduleService) waitForModulesToStop() {
126 // wait until all stopDeps have stopped
127 stopDeps := w.stopDeps(w.name)
128 for n, s := range stopDeps {
129 if s == nil {
130 continue
131 }
132
133 level.Debug(w.logger).Log("msg", "module waiting for", "module", w.name, "waiting_for", n)
134 // Passed context isn't canceled, so we can only get error here, if service
135 // fails. But we don't care *how* service stops, as long as it is done.
136 _ = s.AwaitTerminated(context.Background())
137 }
138}

Callers 1

stopMethod · 0.95

Calls 2

AwaitTerminatedMethod · 0.65
LogMethod · 0.45

Tested by

no test coverage detected