mirror of
https://github.com/steinhobelgruen/netatmo-exporter.git
synced 2024-11-21 17:03:56 +00:00
Increase default stale duration
This commit is contained in:
parent
b794963127
commit
d86981f7bf
|
@ -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 {
|
||||
|
|
|
@ -30,7 +30,7 @@ const (
|
|||
flagNetatmoPassword = "password"
|
||||
|
||||
defaultRefreshInterval = 8 * time.Minute
|
||||
defaultStaleDuration = 30 * time.Minute
|
||||
defaultStaleDuration = 60 * time.Minute
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
Loading…
Reference in a new issue