♻️ 简化数据同步计划任务实现 Fix https://github.com/siyuan-note/siyuan/issues/5329

This commit is contained in:
Liang Ding 2022-07-02 19:37:58 +08:00
parent 6aab504b7b
commit 58dd24564c
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -320,8 +320,7 @@ func syncRepo(byHand bool) {
return
}
util.PushStatusBar(fmt.Sprintf(Conf.Language(149)+" [%s]", elapsed.Seconds(), latest.ID[:7]))
if 1 > len(mergeUpserts) && 1 > len(mergeRemoves) {
// 没有数据变更,直接返回
if 1 > len(mergeUpserts) && 1 > len(mergeRemoves) { // 没有数据变更
syncSameCount++
if 10 < syncSameCount {
syncSameCount = 5