Skip to content

Commit

Permalink
fix high cpu (#10)
Browse files Browse the repository at this point in the history
Signed-off-by: Zzde <[email protected]>
  • Loading branch information
zxh326 authored Jul 15, 2023
1 parent 97d38a2 commit 6d3e50a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func Start(config CollectConfig) {
sleepDuration := time.Duration(min(retryCount*10, 60)) * time.Second
log.Println("collector:", c.Name(), "failed error: ", err, "retry after", sleepDuration)
time.Sleep(sleepDuration)
} else {
return
}
}
}(c)
Expand Down

0 comments on commit 6d3e50a

Please sign in to comment.