Fix resync/repair ticker period
This commit is contained in:
parent
a7aaad0a0b
commit
da63c48b9f
|
|
@ -27,7 +27,8 @@ import (
|
||||||
|
|
||||||
func (c *Controller) clusterResync(stopCh <-chan struct{}, wg *sync.WaitGroup) {
|
func (c *Controller) clusterResync(stopCh <-chan struct{}, wg *sync.WaitGroup) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
ticker := time.NewTicker(c.opConfig.ResyncPeriod.Duration)
|
period := min(c.opConfig.ResyncPeriod.Duration, c.opConfig.RepairPeriod.Duration)
|
||||||
|
ticker := time.NewTicker(period)
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue