forked from TrueCloudLab/frostfs-node
[#1713] morph: Allow switch interval configuration
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
d09ec2e3fe
commit
d240e2dc87
2 changed files with 16 additions and 5 deletions
|
@ -133,9 +133,7 @@ func (c *Client) notificationLoop() {
|
|||
}
|
||||
|
||||
func (c *Client) switchToMostPrioritized() {
|
||||
const period = 2 * time.Minute
|
||||
|
||||
t := time.NewTicker(period)
|
||||
t := time.NewTicker(c.cfg.switchInterval)
|
||||
defer t.Stop()
|
||||
defer c.switchIsActive.Store(false)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue