This commit is contained in:
Liang Ding 2022-06-15 00:38:42 +08:00
parent f49127edf5
commit 0a7af0dcc0
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 20 additions and 12 deletions

View file

@ -884,6 +884,7 @@
"139": "Data snapshot is being generated, [%s] data files have been processed, [%s] remaining...",
"140": "Failed to create data snapshot: %s",
"141": "Failed to rollback data snapshot",
"142": "Snapshot memo cannot be empty"
"142": "Snapshot memo cannot be empty",
"143": "Creating data snapshot..."
}
}

View file

@ -884,6 +884,7 @@
"139": "L'instantané des données est en cours de génération, [%s] fichiers de données ont été traités, [%s] restants...",
"140": "Échec de la création de l'instantané des données: %s",
"141": "Échec de la restauration de l'instantané des données",
"142": "Le mémo d'instantané ne peut pas être vide"
"142": "Le mémo d'instantané ne peut pas être vide",
"143": "Création d'un instantané de données..."
}
}

View file

@ -883,6 +883,7 @@
"139": "正在生成數據快照,已處理 [%s] 個數據文件,剩餘待處理 [%s]...",
"140": "創建數據快照失敗:%s",
"141": "回滾數據快照失敗",
"142": "快照備註不能為空"
"142": "快照備註不能為空",
"143": "正在創建數據快照..."
}
}

View file

@ -885,6 +885,7 @@
"139": "正在生成数据快照,已处理 [%s] 个数据文件,剩余待处理 [%s]...",
"140": "创建数据快照失败:%s",
"141": "回滚数据快照失败",
"142": "快照备注不能为空"
"142": "快照备注不能为空",
"143": "正在创建数据快照..."
}
}

View file

@ -40,7 +40,7 @@ require (
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/qiniu/go-sdk/v7 v7.13.0
github.com/radovskyb/watcher v1.0.7
github.com/siyuan-note/dejavu v0.0.0-20220614142403-d44683c970fc
github.com/siyuan-note/dejavu v0.0.0-20220614163546-adaf586e3af9
github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676
github.com/vmihailenco/msgpack/v5 v5.3.5
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673

View file

@ -419,8 +419,8 @@ github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJ
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/siyuan-note/dejavu v0.0.0-20220614142403-d44683c970fc h1:GRcKYDhL9R3dU1ZemgQdRCDcVV9msadMzDDMD72+C+g=
github.com/siyuan-note/dejavu v0.0.0-20220614142403-d44683c970fc/go.mod h1:Oa/Y6fvTUCg8h9/t6GNWXiu8T7aQri/ZvyDRygnlikI=
github.com/siyuan-note/dejavu v0.0.0-20220614163546-adaf586e3af9 h1:ywsUs8jmpnc2JJnoaLxnhqrdYESBchsfPPUvxhq6Nzo=
github.com/siyuan-note/dejavu v0.0.0-20220614163546-adaf586e3af9/go.mod h1:Oa/Y6fvTUCg8h9/t6GNWXiu8T7aQri/ZvyDRygnlikI=
github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676 h1:QB9TjJQFhXhZ6dAtPpY02DlzHAQm1C+WqZq6OadG8mI=
github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=

View file

@ -135,10 +135,9 @@ func CheckoutRepo(id string) (err error) {
util.PushEndlessProgress(Conf.Language(63))
writingDataLock.Lock()
defer writingDataLock.Unlock()
filesys.ReleaseAllFileLocks()
WaitForWritingFiles()
sql.WaitForWritingDatabase()
filesys.ReleaseAllFileLocks()
CloseWatchAssets()
defer WatchAssets()
@ -193,10 +192,15 @@ func IndexRepo(memo string) (err error) {
return
}
WaitForWritingFiles()
filesys.ReleaseAllFileLocks()
writingDataLock.Lock()
defer writingDataLock.Unlock()
util.PushEndlessProgress(Conf.Language(143))
WaitForWritingFiles()
sql.WaitForWritingDatabase()
filesys.ReleaseAllFileLocks()
CloseWatchAssets()
defer WatchAssets()
_, err = repo.Index(memo, util.PushEndlessProgress, indexCallbacks)
util.PushClearProgress()
return