()
| 99 | } |
| 100 | |
| 101 | func (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 | } |
no test coverage detected