This commit is contained in:
Liang Ding 2023-04-02 11:42:04 +08:00
parent 2d190bf708
commit e8e645f02b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 19 additions and 2 deletions

View file

@ -771,6 +771,15 @@ func IndexRepo(memo string) (err error) {
var syncingFiles = sync.Map{}
var syncingStorages = false
func waitForSyncingStorages() {
for i := 0; i < 30; i++ {
if syncingStorages {
return
}
time.Sleep(time.Second)
}
}
func IsSyncingFile(rootID string) (ret bool) {
_, ret = syncingFiles.Load(rootID)
return