mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 09:02:53 +00:00
The config map was never reset on applying a new config
This commit is contained in:
parent
febebcd49a
commit
a981b51900
@ -83,9 +83,11 @@ func (m *ScrapeManager) Stop() {
|
||||
func (m *ScrapeManager) ApplyConfig(cfg *config.Config) error {
|
||||
done := make(chan struct{})
|
||||
m.actionCh <- func() {
|
||||
c := make(map[string]*config.ScrapeConfig)
|
||||
for _, scfg := range cfg.ScrapeConfigs {
|
||||
m.scrapeConfigs[scfg.JobName] = scfg
|
||||
c[scfg.JobName] = scfg
|
||||
}
|
||||
m.scrapeConfigs = c
|
||||
close(done)
|
||||
}
|
||||
<-done
|
||||
|
Loading…
Reference in New Issue
Block a user