Solcast: don't retry permanent errors

This commit is contained in:
andig 2025-02-25 12:26:26 +01:00
parent aca4ce8c8a
commit 595c684f29

View file

@ -77,7 +77,7 @@ func (t *Solcast) run(interval time.Duration, done chan error) {
if err := backoff.Retry(func() error {
uri := fmt.Sprintf("https://api.solcast.com.au/rooftop_sites/%s/forecasts?period=PT60M&format=json", t.site)
return t.GetJSON(uri, &res)
return backoffPermanentError(t.GetJSON(uri, &res))
}, bo()); err != nil {
once.Do(func() { done <- err })