MCPcopy Create free account
hub / github.com/cortexproject/cortex / waitForModulesToStop

Method waitForModulesToStop

pkg/util/modules/module_service.go:101–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99}
100
101func (w *moduleService) waitForModulesToStop() {
102 // wait until all stopDeps have stopped
103 stopDeps := w.stopDeps(w.name)
104 for n, s := range stopDeps {
105 if s == nil {
106 continue
107 }
108
109 level.Debug(w.logger).Log("msg", "module waiting for", "module", w.name, "waiting_for", n)
110 // Passed context isn't canceled, so we can only get error here, if service
111 // fails. But we don't care *how* service stops, as long as it is done.
112 _ = s.AwaitTerminated(context.Background())
113 }
114}

Callers 1

stopMethod · 0.95

Calls 2

AwaitTerminatedMethod · 0.65
LogMethod · 0.45

Tested by

no test coverage detected