mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-01-23 22:42:15 +08:00
change pan scan interval
This commit is contained in:
parent
621925709d
commit
dd72192db6
@ -10,6 +10,9 @@ const (
|
||||
// TimeSecondsOfOneMinute 一分钟秒数
|
||||
TimeSecondsOfOneMinute int64 = 60
|
||||
|
||||
// TimeSecondsOf2Minute 2分钟秒数
|
||||
TimeSecondsOf2Minute int64 = 2 * TimeSecondsOfOneMinute
|
||||
|
||||
// TimeSecondsOf5Minute 5分钟秒数
|
||||
TimeSecondsOf5Minute int64 = 5 * TimeSecondsOfOneMinute
|
||||
|
||||
|
@ -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) // 延迟避免触发风控
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user