mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
lib/promscrape/discovery: remove superflouos check in registerPendingAPIWatchers
The check `_, ok := uw.aws[aw]; !ok` isn't needed, since aw cannot exist in uw.aws because of the check inside subscribeAPIWatcher
This commit is contained in:
parent
3ec6639bbb
commit
59f9960992
1 changed files with 1 additions and 3 deletions
|
@ -437,10 +437,8 @@ func (uw *urlWatcher) registerPendingAPIWatchers() {
|
|||
for aw := range uw.awsPending {
|
||||
awsPending = append(awsPending, aw)
|
||||
delete(uw.awsPending, aw)
|
||||
if _, ok := uw.aws[aw]; !ok {
|
||||
uw.aws[aw] = struct{}{}
|
||||
}
|
||||
}
|
||||
uw.reloadScrapeWorksForAPIWatchers(awsPending, uw.objectsByKey)
|
||||
uw.mu.Unlock()
|
||||
metrics.GetOrCreateCounter(fmt.Sprintf(`vm_promscrape_discovery_kubernetes_subscribers{role=%q,status="working"}`, uw.role)).Add(len(awsPending))
|
||||
|
|
Loading…
Reference in a new issue