Annotations: Make the annotation clean up batch size configurable (#31487)

Signed-off-by: bergquist <carl.bergquist@gmail.com>

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
Carl Bergquist
2021-03-08 14:16:07 +01:00
committed by GitHub
parent 445132a904
commit 3b36636318
5 changed files with 17 additions and 1 deletions

View File

@@ -105,7 +105,7 @@ func (ss *SQLStore) Init() error {
// Init repo instances
annotations.SetRepository(&SQLAnnotationRepo{})
annotations.SetAnnotationCleaner(&AnnotationCleanupService{batchSize: 100, log: log.New("annotationcleaner")})
annotations.SetAnnotationCleaner(&AnnotationCleanupService{batchSize: ss.Cfg.AnnotationCleanupJobBatchSize, log: log.New("annotationcleaner")})
ss.Bus.SetTransactionManager(ss)
// Register handlers