From 9a48f57b66b8e5a993491986f82a51c244c0c624 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Fri, 12 Jul 2013 22:38:02 +0200 Subject: [PATCH] Continue scraping old targets on SD fail. When we have trouble resolving the targets for a job via service discovery, we shouldn't just stop scraping the targets we currently have. --- retrieval/targetpool.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/retrieval/targetpool.go b/retrieval/targetpool.go index 3ba257162..0dfbc00e8 100644 --- a/retrieval/targetpool.go +++ b/retrieval/targetpool.go @@ -127,10 +127,10 @@ func (p *TargetPool) runIteration(results chan<- *extraction.Result, interval ti if p.targetProvider != nil { targets, err := p.targetProvider.Targets() if err != nil { - log.Printf("Error looking up targets: %s", err) - return + log.Printf("Error looking up targets, keeping old list: %s", err) + } else { + p.ReplaceTargets(targets) } - p.ReplaceTargets(targets) } p.RLock()