Solcast: don't retry permanent errors
This commit is contained in:
parent
aca4ce8c8a
commit
595c684f29
1 changed files with 1 additions and 1 deletions
|
|
@ -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 })
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue