change pan scan interval

This commit is contained in:
tickstep 2022-06-18 08:39:18 +08:00
parent 621925709d
commit dd72192db6
2 changed files with 5 additions and 2 deletions

View File

@ -10,6 +10,9 @@ const (
// TimeSecondsOfOneMinute 一分钟秒数
TimeSecondsOfOneMinute int64 = 60
// TimeSecondsOf2Minute 2分钟秒数
TimeSecondsOf2Minute int64 = 2 * TimeSecondsOfOneMinute
// TimeSecondsOf5Minute 5分钟秒数
TimeSecondsOf5Minute int64 = 5 * TimeSecondsOfOneMinute

View File

@ -502,7 +502,7 @@ func (t *SyncTask) scanPanFile(ctx context.Context) {
// restart scan loop over again
folderQueue.Push(rootPanFile)
delayTimeCount = TimeSecondsOfOneMinute
delayTimeCount = TimeSecondsOf2Minute
continue
}
item := obj.(*aliyunpan.FileEntity)
@ -557,7 +557,7 @@ func (t *SyncTask) scanPanFile(ctx context.Context) {
logger.Verboseln("add files to pan file db error {}", er)
}
}
time.Sleep(2 * time.Second) // 延迟避免触发风控
time.Sleep(5 * time.Second) // 延迟避免触发风控
}
}
}