This commit is contained in:
Liang Ding 2022-07-02 20:43:18 +08:00
parent b235eb24ad
commit 177b42c1ef
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 13 additions and 6 deletions

View file

@ -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-20220702111355-f4242fdd0e4b
github.com/siyuan-note/dejavu v0.0.0-20220702123733-b829773aeffe
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-20220616063212-74cfba0754ee

View file

@ -421,8 +421,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-20220702111355-f4242fdd0e4b h1:CDpx6Npb4Ef+XWRfe1BjFcxW3VGg02/SpOyc4eIj6hw=
github.com/siyuan-note/dejavu v0.0.0-20220702111355-f4242fdd0e4b/go.mod h1:0t+TpAdsrrv+6LkhDlJY2Gl92CQexgp8KWOBp5Ah9kU=
github.com/siyuan-note/dejavu v0.0.0-20220702123733-b829773aeffe h1:/awuEhSKXTQXxBB1+0YYUtqVya6RHSO6DBVRf9uTlr4=
github.com/siyuan-note/dejavu v0.0.0-20220702123733-b829773aeffe/go.mod h1:0t+TpAdsrrv+6LkhDlJY2Gl92CQexgp8KWOBp5Ah9kU=
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=

View file

@ -307,9 +307,16 @@ func syncRepo(byHand bool) {
defer WatchAssets()
start := time.Now()
latest, mergeUpserts, mergeRemoves, err := repo.Sync(Conf.Sync.CloudName, Conf.User.UserId, Conf.User.UserToken, Conf.System.NetworkProxy.String(), util.AliyunServer, map[string]interface{}{
CtxPushMsg: CtxPushMsgToStatusBar,
})
cloudInfo := &dejavu.CloudInfo{
Dir: Conf.Sync.CloudName,
UserID: Conf.User.UserId,
Token: Conf.User.UserToken,
LimitSize: int64(Conf.User.UserSiYuanRepoSize),
ProxyURL: Conf.System.NetworkProxy.String(),
Server: util.AliyunServer,
}
syncContext := map[string]interface{}{CtxPushMsg: CtxPushMsgToStatusBar}
latest, mergeUpserts, mergeRemoves, err := repo.Sync(cloudInfo, syncContext)
elapsed := time.Since(start)
util.LogInfof("sync data repo elapsed [%.2fs], latest [%s]", elapsed.Seconds(), latest.ID)
if nil != err {