mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: automatically remove stale alerting states (#36767)
* initial attempt at automatic removal of stale states * test case, need espected states * finish unit test * PR feedback * still multiply by time.second * pr feedback
This commit is contained in:
@@ -263,3 +263,9 @@ func mergeLabels(a, b data.Labels) data.Labels {
|
||||
}
|
||||
return newLbs
|
||||
}
|
||||
|
||||
func (c *cache) deleteEntry(orgID int64, alertRuleUID, cacheID string) {
|
||||
c.mtxStates.Lock()
|
||||
defer c.mtxStates.Unlock()
|
||||
delete(c.states[orgID][alertRuleUID], cacheID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user