mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Unnecessary go routine spawn. (#7951)
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
This commit is contained in:
parent
7aa5fb01bf
commit
4a52faf2ae
|
@ -954,14 +954,12 @@ func (m *Manager) Update(interval time.Duration, files []string, externalLabels
|
|||
oldg.stop()
|
||||
newg.CopyState(oldg)
|
||||
}
|
||||
go func() {
|
||||
// Wait with starting evaluation until the rule manager
|
||||
// is told to run. This is necessary to avoid running
|
||||
// queries against a bootstrapping storage.
|
||||
<-m.block
|
||||
newg.run(m.opts.Context)
|
||||
}()
|
||||
wg.Done()
|
||||
// Wait with starting evaluation until the rule manager
|
||||
// is told to run. This is necessary to avoid running
|
||||
// queries against a bootstrapping storage.
|
||||
<-m.block
|
||||
newg.run(m.opts.Context)
|
||||
}(newg)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue