Alerting: Add scheduled clean-up of deleted rules (#101963)

* add scheduled clean up of deleted rules


---------

Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
Yuri Tseretyan
2025-03-11 16:58:26 -04:00
committed by GitHub
parent 9870718c3a
commit 943b73a682
7 changed files with 190 additions and 3 deletions
+3
View File
@@ -10,6 +10,7 @@ import (
"github.com/google/wire"
sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
"github.com/grafana/grafana/pkg/api"
"github.com/grafana/grafana/pkg/api/avatar"
"github.com/grafana/grafana/pkg/api/routing"
@@ -421,6 +422,7 @@ var wireSet = wire.NewSet(
prefimpl.ProvideService,
oauthtoken.ProvideService,
wire.Bind(new(oauthtoken.OAuthTokenService), new(*oauthtoken.Service)),
wire.Bind(new(cleanup.AlertRuleService), new(*ngstore.DBstore)),
)
var wireCLISet = wire.NewSet(
@@ -453,6 +455,7 @@ var wireTestSet = wire.NewSet(
oauthtoken.ProvideService,
oauthtokentest.ProvideService,
wire.Bind(new(oauthtoken.OAuthTokenService), new(*oauthtokentest.Service)),
wire.Bind(new(cleanup.AlertRuleService), new(*ngstore.DBstore)),
)
func Initialize(cfg *setting.Cfg, opts Options, apiOpts api.ServerOptions) (*Server, error) {