mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
clean unused code (#5735)
Signed-off-by: helen <haitao.zhang@daocloud.io>
This commit is contained in:
parent
b7fd7ee0b6
commit
c8a96ac241
1 changed files with 2 additions and 2 deletions
|
@ -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++
|
||||||
|
|
Loading…
Reference in a new issue