Forecast: fix expiry for non-standard update intervals
This commit is contained in:
parent
90bd805a6b
commit
5391017149
2 changed files with 2 additions and 2 deletions
|
|
@ -57,7 +57,7 @@ func NewSolcastFromConfig(other map[string]interface{}) (api.Tariff, error) {
|
|||
log: log,
|
||||
sites: []string{cc.Site},
|
||||
Helper: request.NewHelper(log),
|
||||
data: util.NewMonitor[api.Rates](2 * time.Hour),
|
||||
data: util.NewMonitor[api.Rates](6 * /*len(cc.Sites)*/ time.Hour),
|
||||
}
|
||||
|
||||
t.Client.Transport = transport.BearerAuth(cc.Token, t.Client.Transport)
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ func NewConfigurableFromConfig(ctx context.Context, other map[string]interface{}
|
|||
embed: &cc.embed,
|
||||
typ: cc.Type,
|
||||
priceG: priceG,
|
||||
data: util.NewMonitor[api.Rates](2 * time.Hour),
|
||||
data: util.NewMonitor[api.Rates](2 * cc.Interval),
|
||||
}
|
||||
|
||||
if forecastG != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue