🎨 Automatically check cloud data integrity https://github.com/siyuan-note/siyuan/issues/8653

This commit is contained in:
Daniel 2023-07-02 17:48:02 +08:00
parent 593959312d
commit 88cd5f063f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
8 changed files with 51 additions and 11 deletions

View file

@ -45,9 +45,9 @@ require (
github.com/radovskyb/watcher v1.0.7
github.com/sashabaranov/go-openai v1.12.0
github.com/shirou/gopsutil/v3 v3.23.5
github.com/siyuan-note/dejavu v0.0.0-20230701164716-3bd946c2227d
github.com/siyuan-note/dejavu v0.0.0-20230702094059-ebefc7dc4498
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75
github.com/siyuan-note/eventbus v0.0.0-20230216103454-41885eac6c2b
github.com/siyuan-note/eventbus v0.0.0-20230702081350-6dde667e7112
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524
github.com/siyuan-note/httpclient v0.0.0-20230625034122-2e57d97ca444
github.com/siyuan-note/logging v0.0.0-20230327073243-ebe83aec1493

View file

@ -287,12 +287,12 @@ github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5g
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
github.com/siyuan-note/dejavu v0.0.0-20230701164716-3bd946c2227d h1:XCAqfdZLlkxMSFecf5mEQncKZri+fFBIPAbpq1K0+wI=
github.com/siyuan-note/dejavu v0.0.0-20230701164716-3bd946c2227d/go.mod h1:iR6kmFYS3jz/yuDFg6atb0yZdDs2RvS5gf3NzTL4frI=
github.com/siyuan-note/dejavu v0.0.0-20230702094059-ebefc7dc4498 h1:pdGacClM5a4nDD+OQ0+4lMN62k5xovhizABM3d4Nh4M=
github.com/siyuan-note/dejavu v0.0.0-20230702094059-ebefc7dc4498/go.mod h1:GxekubylJpkSt5Y29ecxNxjpKusPov+07mM1rsPtk+g=
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE=
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=
github.com/siyuan-note/eventbus v0.0.0-20230216103454-41885eac6c2b h1:828lTUW2C0uNiolODqoACu7J8sDUzswD4Xo04mUombg=
github.com/siyuan-note/eventbus v0.0.0-20230216103454-41885eac6c2b/go.mod h1:Sqo4FYX5lAXu7gWkbEdJF0e6P57tNNVV4WDKYDctokI=
github.com/siyuan-note/eventbus v0.0.0-20230702081350-6dde667e7112 h1:lb+8C+XEEEn/lcBtoXlrf5mZEoe0y0KlqiIGG93Gozc=
github.com/siyuan-note/eventbus v0.0.0-20230702081350-6dde667e7112/go.mod h1:Sqo4FYX5lAXu7gWkbEdJF0e6P57tNNVV4WDKYDctokI=
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524 h1:ZuxN5gwqtUOd1NkOkNhM4OlVWfjujY98zsR+zFi4x9g=
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524/go.mod h1:jK5lCYfPbFOrW23/HMeU7kmpLdEd5GkennF+kUpy7Vs=
github.com/siyuan-note/httpclient v0.0.0-20230625034122-2e57d97ca444 h1:AE9ggQ7Tg/iytE6Wq/auBc0uZ/G+hYSRWK23TeHeFmg=

View file

@ -1647,6 +1647,26 @@ func subscribeRepoEvents() {
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
})
eventbus.Subscribe(eventbus.EvtCloudBeforeUploadIndexes, func(context map[string]interface{}) {
msg := fmt.Sprintf(Conf.Language(208))
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
})
eventbus.Subscribe(eventbus.EvtCloudBeforeUploadCheckIndex, func(context map[string]interface{}) {
msg := fmt.Sprintf(Conf.Language(209))
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
})
eventbus.Subscribe(eventbus.EvtCloudBeforeFixObjects, func(context map[string]interface{}) {
msg := fmt.Sprintf(Conf.Language(210))
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
})
eventbus.Subscribe(eventbus.EvtCloudAfterFixObjects, func(context map[string]interface{}) {
msg := fmt.Sprintf(Conf.Language(211))
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
})
}
func buildCloudConf() (ret *cloud.Conf, err error) {