clean unused code (#5735)

Signed-off-by: helen <haitao.zhang@daocloud.io>
This commit is contained in:
helen 2024-02-01 01:50:36 +08:00 committed by Aliaksandr Valialkin
parent cc626ae3b5
commit 99ea84f0fd
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -410,7 +410,7 @@ func (sg *scraperGroup) update(sws []*ScrapeWork) {
sg.scrapersStarted.Inc() sg.scrapersStarted.Inc()
sg.wg.Add(1) sg.wg.Add(1)
tsmGlobal.Register(&sc.sw) tsmGlobal.Register(&sc.sw)
go func(sw *ScrapeWork) { go func() {
defer func() { defer func() {
sg.wg.Done() sg.wg.Done()
close(sc.stoppedCh) close(sc.stoppedCh)
@ -419,7 +419,7 @@ func (sg *scraperGroup) update(sws []*ScrapeWork) {
tsmGlobal.Unregister(&sc.sw) tsmGlobal.Unregister(&sc.sw)
sg.activeScrapers.Dec() sg.activeScrapers.Dec()
sg.scrapersStopped.Inc() sg.scrapersStopped.Inc()
}(sw) }()
key := sw.key() key := sw.key()
sg.m[key] = sc sg.m[key] = sc
additionsCount++ additionsCount++