[#378] shard: Initialize GC processes on Init
`Shard.Init` method creates a new GC instance from shard configuration and starts GC's workers through `init` call. In initial implementation GC routines are indefinite and can be killed only with by application shutdown. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
13087dc3dd
commit
4da41613c3
1 changed files with 8 additions and 0 deletions
|
@ -39,6 +39,14 @@ func (s *Shard) Init() error {
|
|||
}
|
||||
}
|
||||
|
||||
gc := &gc{
|
||||
gcCfg: s.gcCfg,
|
||||
remover: s.removeGarbage,
|
||||
mEventHandler: map[eventType]*eventHandlers{},
|
||||
}
|
||||
|
||||
gc.init()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue