(fn func())
| 65 | } |
| 66 | |
| 67 | func (s *LiveStore) runInBackground(fn func()) { |
| 68 | s.wg.Add(1) |
| 69 | go func() { |
| 70 | defer s.wg.Done() |
| 71 | |
| 72 | select { |
| 73 | case <-s.startupComplete: |
| 74 | case <-s.ctx.Done(): |
| 75 | return |
| 76 | } |
| 77 | |
| 78 | fn() |
| 79 | }() |
| 80 | } |
| 81 | |
| 82 | func (s *LiveStore) globalCompleteLoop(idx int) { |
| 83 | level.Info(s.logger).Log("msg", "starting completing loop", "index", idx) |
no test coverage detected