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 GitHub
parent b7fd7ee0b6
commit c8a96ac241
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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