1
0
mirror of https://github.com/bgp/stayrtr.git synced 2024-05-06 15:54:54 +00:00

Update inGracePeriod metric even when data source was not modified

Time still passes so VRPs may be dropped due to the expiration of the
grace period.
This commit is contained in:
Erik Rozendaal
2022-10-18 11:11:06 +02:00
parent 5a841b3c71
commit e2bcc18e4d

View File

@ -351,9 +351,10 @@ func (c *Client) Start(id int, ch chan int) {
}
updatedVrpMap, inGracePeriod = BuildNewVrpMap(log.WithField("client", c.id), c.vrps, decoded.Data, tCurrentUpdate)
VRPInGracePeriod.With(prometheus.Labels{"url": c.Path}).Set(float64(inGracePeriod))
}
VRPInGracePeriod.With(prometheus.Labels{"url": c.Path}).Set(float64(inGracePeriod))
c.compLock.Lock()
c.vrps = updatedVrpMap
c.lastUpdate = tCurrentUpdate