Increase default stale duration

This commit is contained in:
Robert Jacob 2020-07-03 16:47:41 +02:00
parent b794963127
commit d86981f7bf
2 changed files with 3 additions and 1 deletions

View file

@ -126,6 +126,7 @@ type NetatmoCollector struct {
cachedData *netatmo.DeviceCollection
}
// Describe implements prometheus.Collector
func (c *NetatmoCollector) Describe(dChan chan<- *prometheus.Desc) {
dChan <- updatedDesc
dChan <- tempDesc
@ -133,6 +134,7 @@ func (c *NetatmoCollector) Describe(dChan chan<- *prometheus.Desc) {
dChan <- cotwoDesc
}
// Collect implements prometheus.Collector
func (c *NetatmoCollector) Collect(mChan chan<- prometheus.Metric) {
now := time.Now()
if now.Sub(c.lastRefresh) >= c.RefreshInterval {

View file

@ -30,7 +30,7 @@ const (
flagNetatmoPassword = "password"
defaultRefreshInterval = 8 * time.Minute
defaultStaleDuration = 30 * time.Minute
defaultStaleDuration = 60 * time.Minute
)
var (