change leader locker only for crawler (#10509)

This commit is contained in:
Harshavardhana
2020-09-18 11:15:54 -07:00
committed by GitHub
parent 3168e93730
commit 1cf322b7d4
4 changed files with 22 additions and 24 deletions

View File

@@ -26,17 +26,11 @@ import (
const (
bgHealingUUID = "0000-0000-0000-0000"
// sleep for an hour after a lock timeout
// before retrying to acquire lock again.
leaderLockTimeoutSleepInterval = time.Hour
)
var leaderLockTimeout = newDynamicTimeout(1*time.Minute, 30*time.Second)
// NewBgHealSequence creates a background healing sequence
// operation which crawls all objects and heal them.
func newBgHealSequence() *healSequence {
reqInfo := &logger.ReqInfo{API: "BackgroundHeal"}
ctx, cancelCtx := context.WithCancel(logger.SetReqInfo(GlobalContext, reqInfo))