From 4b8304703720ddfe00a73e3121a4cf0b8643091b Mon Sep 17 00:00:00 2001 From: Markus Blaschke Date: Thu, 15 Jun 2023 20:45:24 +0200 Subject: [PATCH] fix high load when scrape time is 0 fixes #43 Signed-off-by: Markus Blaschke --- config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 7192897..aa8749c 100644 --- a/config/config.go +++ b/config/config.go @@ -36,7 +36,7 @@ type ( ) func (c *CollectorBase) IsEnabled() bool { - return c.ScrapeTime != nil && c.ScrapeTime.Seconds() >= 0 + return c.ScrapeTime != nil && c.ScrapeTime.Seconds() > 0 } func (c *Config) GetJson() []byte {