Skip to content

Commit

Permalink
🎨 公测云端同步数据仓库 #5337
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jul 6, 2022
1 parent f0c124b commit 500b0b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kernel/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ require (
github.com/qiniu/go-sdk/v7 v7.13.0
github.com/radovskyb/watcher v1.0.7
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/siyuan-note/dejavu v0.0.0-20220706072418-8021418aa8fb
github.com/siyuan-note/dejavu v0.0.0-20220706073837-ba878f02864c
github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676
github.com/siyuan-note/eventbus v0.0.0-20220624162334-ca7c06dc771f
github.com/siyuan-note/filelock v0.0.0-20220704090116-54dfb035283f
Expand Down
2 changes: 2 additions & 0 deletions kernel/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,8 @@ github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJV
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/siyuan-note/dejavu v0.0.0-20220706072418-8021418aa8fb h1:YgWLET2Wjtiu0idoxj0Sqk9HNwN/nCZo47YuR4C8zBA=
github.com/siyuan-note/dejavu v0.0.0-20220706072418-8021418aa8fb/go.mod h1:ral+X0pNW6nSQVvIcxllUXSczCaY4UOCT2iGlO4YNg0=
github.com/siyuan-note/dejavu v0.0.0-20220706073837-ba878f02864c h1:Jo7LvzIJNM64e+w6js200O0YxnTI2eRK6ILkSiHYRmk=
github.com/siyuan-note/dejavu v0.0.0-20220706073837-ba878f02864c/go.mod h1:ral+X0pNW6nSQVvIcxllUXSczCaY4UOCT2iGlO4YNg0=
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/siyuan-note/eventbus v0.0.0-20220624162334-ca7c06dc771f h1:JMobMNZ7AqaKKyEK+WeWFhix/2TDQXgPZDajU00IybU=
Expand Down
3 changes: 2 additions & 1 deletion kernel/model/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ func UploadCloudSnapshot(tag, id string) (err error) {
return
}

util.PushEndlessProgress(Conf.Language(116))
defer util.PushClearProgress()
uploadFileCount, uploadChunkCount, uploadBytes, err := repo.UploadTagIndex(tag, id, cloudInfo, map[string]interface{}{CtxPushMsg: CtxPushMsgToStatusBarAndProgress})
if nil != err {
Expand Down Expand Up @@ -455,7 +456,7 @@ func syncRepo(boot, exit, byHand bool) {
if nil != err {
util.LogErrorf("sync data repo failed: %s", err)
msg := fmt.Sprintf(Conf.Language(80), formatErrorMsg(err))
if errors.Is(err, dejavu.ErrSyncCloudStorageSizeExceeded) {
if errors.Is(err, dejavu.ErrCloudStorageSizeExceeded) {
msg = fmt.Sprintf(Conf.Language(43), byteCountSI(int64(Conf.User.UserSiYuanRepoSize)))
}
Conf.Sync.Stat = msg
Expand Down

0 comments on commit 500b0b8

Please sign in to comment.