()
| 123 | } |
| 124 | |
| 125 | func (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 | } |
no test coverage detected