lib/promscrape: typo fix, which prevented from caching ScrapeWork entries

This commit is contained in:
Aliaksandr Valialkin 2021-03-01 12:12:56 +02:00
parent d5058caccc
commit 5328506c3e

View file

@ -737,7 +737,7 @@ func (swc *scrapeWorkConfig) getScrapeWork(target string, extraLabels, metaLabel
return sw, nil return sw, nil
} }
sw, err := swc.getScrapeWorkReal(target, extraLabels, metaLabels) sw, err := swc.getScrapeWorkReal(target, extraLabels, metaLabels)
if err != nil { if err == nil {
swc.cache.Set(string(bb.B), sw) swc.cache.Set(string(bb.B), sw)
} }
return sw, err return sw, err