[#71] Make GC configurable

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-10-05 13:44:28 +03:00 committed by Alex Vanin
parent 7a2654719e
commit a9e801cb22
2 changed files with 12 additions and 2 deletions

View file

@ -192,6 +192,9 @@ func initObjectService(c *cfg) {
objGC := gc.New(
gc.WithLogger(c.log),
gc.WithRemover(ls),
gc.WithQueueCapacity(c.viper.GetUint32(cfgGCQueueSize)),
gc.WithSleepInterval(c.viper.GetDuration(cfgGCQueueTick)),
gc.WithWorkingInterval(c.viper.GetDuration(cfgGCTimeout)),
)
c.workers = append(c.workers, objGC)