[#132] Use netmap cleaner in inner ring server
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
94957dd38c
commit
976ba06300
2 changed files with 12 additions and 7 deletions
|
@ -83,4 +83,7 @@ func defaultConfiguration(cfg *viper.Viper) {
|
||||||
cfg.SetDefault("workers.neofs", "10")
|
cfg.SetDefault("workers.neofs", "10")
|
||||||
cfg.SetDefault("workers.container", "10")
|
cfg.SetDefault("workers.container", "10")
|
||||||
cfg.SetDefault("workers.alphabet", "10")
|
cfg.SetDefault("workers.alphabet", "10")
|
||||||
|
|
||||||
|
cfg.SetDefault("netmap_cleaner.enabled", false)
|
||||||
|
cfg.SetDefault("netmap_cleaner.threshold", 3)
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,13 +173,15 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
|
||||||
|
|
||||||
// create netmap processor
|
// create netmap processor
|
||||||
netmapProcessor, err := netmap.New(&netmap.Params{
|
netmapProcessor, err := netmap.New(&netmap.Params{
|
||||||
Log: log,
|
Log: log,
|
||||||
PoolSize: cfg.GetInt("workers.netmap"),
|
PoolSize: cfg.GetInt("workers.netmap"),
|
||||||
NetmapContract: server.contracts.netmap,
|
NetmapContract: server.contracts.netmap,
|
||||||
EpochTimer: server.localTimers,
|
EpochTimer: server.localTimers,
|
||||||
MorphClient: server.morphClient,
|
MorphClient: server.morphClient,
|
||||||
EpochState: server,
|
EpochState: server,
|
||||||
ActiveState: server,
|
ActiveState: server,
|
||||||
|
CleanupEnabled: cfg.GetBool("netmap_cleaner.enabled"),
|
||||||
|
CleanupThreshold: cfg.GetUint64("netmap_cleaner.threshold"),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue