🎨 为桌面端添加 同步模式 选择 https://github.com/siyuan-note/siyuan/issues/5089

This commit is contained in:
Liang Ding 2022-06-03 17:11:27 +08:00
parent b108480450
commit 2711bc5df8
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 16 additions and 0 deletions

View file

@ -68,6 +68,10 @@ func AutoSync() {
func SyncData(boot, exit, byHand bool) {
defer util.Recover()
if !boot && !exit && 2 == Conf.Sync.Mode && !byHand {
return
}
if util.IsMutexLocked(&syncLock) {
util.LogWarnf("sync has been locked")
syncInterval = 30 * time.Second