🎨 Sync repo

This commit is contained in:
Liang Ding 2022-07-03 17:11:00 +08:00
parent 8f4aa20f2d
commit 8a587c23e2
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
8 changed files with 25 additions and 21 deletions

View file

@ -196,11 +196,11 @@ func SyncData(boot, exit, byHand bool) {
syncSameCount = 5
}
if !byHand {
after := time.Minute * time.Duration(int(math.Pow(2, float64(syncSameCount))))
if fixSyncInterval.Minutes() > after.Minutes() {
after = time.Minute * 8
delay := time.Minute * time.Duration(int(math.Pow(2, float64(syncSameCount))))
if fixSyncInterval.Minutes() > delay.Minutes() {
delay = time.Minute * 8
}
planSyncAfter(after)
planSyncAfter(delay)
}
Conf.Sync.Stat = Conf.Language(133)
@ -460,6 +460,7 @@ func incReindex(upserts, removes []string) {
if !strings.HasSuffix(removeFile, ".sy") {
continue
}
id := strings.TrimSuffix(filepath.Base(removeFile), ".sy")
block := treenode.GetBlockTree(id)
if nil != block {