remove global variable in annotation (#46746)

* remove global varaible in annotation

* remove todo

* replace intransaction with withdbtransaction

* fix typo
This commit is contained in:
ying-jeanne
2022-03-22 19:20:57 +08:00
committed by GitHub
parent 3d43535bc3
commit adc0cbf176
8 changed files with 157 additions and 152 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ func newSQLStore(cfg *setting.Cfg, cacheService *localcache.CacheService, b bus.
dialect = ss.Dialect
// Init repo instances
annotations.SetRepository(&SQLAnnotationRepo{})
annotations.SetRepository(&SQLAnnotationRepo{sql: ss})
annotations.SetAnnotationCleaner(&AnnotationCleanupService{batchSize: ss.Cfg.AnnotationCleanupJobBatchSize, log: log.New("annotationcleaner")})
ss.Bus.SetTransactionManager(ss)