Chore: Move annotations cleanup to the annotations service (#55618)

This commit is contained in:
Sofia Papagiannaki
2022-09-22 15:27:48 +03:00
committed by GitHub
parent 4739ff06a5
commit 2f14575dd3
12 changed files with 179 additions and 158 deletions

View File

@ -25,7 +25,6 @@ import (
"github.com/grafana/grafana/pkg/infra/tracing"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/registry"
"github.com/grafana/grafana/pkg/services/annotations"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/sqlstore/migrations"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
@ -119,9 +118,6 @@ func newSQLStore(cfg *setting.Cfg, cacheService *localcache.CacheService, engine
dialect = ss.Dialect
// Init repo instances
annotations.SetAnnotationCleaner(&AnnotationCleanupService{batchSize: ss.Cfg.AnnotationCleanupJobBatchSize, log: log.New("annotationcleaner"), sqlstore: ss})
// if err := ss.Reset(); err != nil {
// return nil, err
// }