Remove redundant queries in GetAlertRules and GetOrgAlertRules and replace with ListAlertRules (#48108)

This commit is contained in:
George Robinson
2022-04-25 11:42:42 +01:00
committed by GitHub
parent 7cfab77650
commit c5547123bc
8 changed files with 103 additions and 117 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ func (st *Manager) Warm(ctx context.Context) {
ruleCmd := ngModels.ListAlertRulesQuery{
OrgID: orgId,
}
if err := st.ruleStore.GetOrgAlertRules(ctx, &ruleCmd); err != nil {
if err := st.ruleStore.ListAlertRules(ctx, &ruleCmd); err != nil {
st.log.Error("unable to fetch previous state", "msg", err.Error())
}