This commit is contained in:
parent
43b0ee60cf
commit
20fe3affc1
8 changed files with 28 additions and 16 deletions
|
@ -917,8 +917,8 @@
|
|||
"159": "Indexing data repo, getting the latest file %v",
|
||||
"160": "Indexing data repo, inserting file %v",
|
||||
"161": "Checking out of data repo, walking data %s",
|
||||
"162": "Checking out data repo, inserting file %s",
|
||||
"163": "Checking out data repo, deleting file %s",
|
||||
"162": "Checking out data repo, inserting file %v",
|
||||
"163": "Checking out data repo, deleting file %v",
|
||||
"164": "Downloading data repo snapshot %s",
|
||||
"165": "Downloading data repo file %v",
|
||||
"166": "Downloading data repo chunk %v",
|
||||
|
|
|
@ -917,8 +917,8 @@
|
|||
"159": "Indexando repositorio de datos, obteniendo el último archivo %v",
|
||||
"160": "Indexando repositorio de datos, insertando archivo %v",
|
||||
"161": "Revisando el repositorio de datos, recorriendo datos %s",
|
||||
"162": "Revisando el repositorio de datos, insertando el archivo %s",
|
||||
"163": "Revisando el repositorio de datos, eliminando el archivo %s",
|
||||
"162": "Revisando el repositorio de datos, insertando el archivo %v",
|
||||
"163": "Revisando el repositorio de datos, eliminando el archivo %v",
|
||||
"164": "Descargando instantánea de repositorio de datos %s",
|
||||
"165": "Descargando archivo de repositorio de datos %v",
|
||||
"166": "Descargando parte de repositorio de datos %v",
|
||||
|
|
|
@ -917,8 +917,8 @@
|
|||
"159": "Indexation du référentiel de données, obtention du dernier fichier %v",
|
||||
"160": "Indexation du référentiel de données, insertion du fichier %v",
|
||||
"161": "Vérification du référentiel de données, données piétonnes %s",
|
||||
"162": "Vérification du référentiel de données, insertion du fichier %s",
|
||||
"163": "Vérification du référentiel de données, suppression du fichier %s",
|
||||
"162": "Vérification du référentiel de données, insertion du fichier %v",
|
||||
"163": "Vérification du référentiel de données, suppression du fichier %v",
|
||||
"164": "Téléchargement du l'instantané du référentiel de données %s",
|
||||
"165": "Téléchargement du fichier de référentiel de données %v",
|
||||
"166": "Téléchargement du bloc de dépôt de données %v",
|
||||
|
|
|
@ -916,8 +916,8 @@
|
|||
"159": "正在索引數據倉庫,獲取最新文件 %v",
|
||||
"160": "正在索引數據倉庫,插入文件 %v",
|
||||
"161": "正在遷出數據倉庫,遍歷數據 %s",
|
||||
"162": "正在遷出數據倉庫,插入文件 %s",
|
||||
"163": "正在遷出數據倉庫,刪除文件 %s",
|
||||
"162": "正在遷出數據倉庫,插入文件 %v",
|
||||
"163": "正在遷出數據倉庫,刪除文件 %v",
|
||||
"164": "正在下載數據倉庫快照 %s",
|
||||
"165": "正在下載數據倉庫文件 %v",
|
||||
"166": "正在下載數據倉庫分塊 %v",
|
||||
|
|
|
@ -918,8 +918,8 @@
|
|||
"159": "正在索引数据仓库,获取最新文件 %v",
|
||||
"160": "正在索引数据仓库,插入文件 %v",
|
||||
"161": "正在迁出数据仓库,遍历数据 %s",
|
||||
"162": "正在迁出数据仓库,插入文件 %s",
|
||||
"163": "正在迁出数据仓库,删除文件 %s",
|
||||
"162": "正在迁出数据仓库,插入文件 %v",
|
||||
"163": "正在迁出数据仓库,删除文件 %v",
|
||||
"164": "正在下载数据仓库快照 %s",
|
||||
"165": "正在下载数据仓库文件 %v",
|
||||
"166": "正在下载数据仓库分块 %v",
|
||||
|
|
|
@ -39,7 +39,7 @@ require (
|
|||
github.com/panjf2000/ants/v2 v2.5.0
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||
github.com/radovskyb/watcher v1.0.7
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220717085949-1fcc8abe03a7
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220718172206-7cf1bc791bdc
|
||||
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75
|
||||
github.com/siyuan-note/eventbus v0.0.0-20220624162334-ca7c06dc771f
|
||||
github.com/siyuan-note/filelock v0.0.0-20220704090116-54dfb035283f
|
||||
|
|
|
@ -514,8 +514,8 @@ github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYED
|
|||
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
|
||||
github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220717085949-1fcc8abe03a7 h1:fwArXZt5uFHIy7osjyn2iz+1j7gn4LEbCpcZDTdo+PE=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220717085949-1fcc8abe03a7/go.mod h1:0VEmTSMPoFer5yCQ4ozkjC0YX1rpK7BEJ0IwXI2cqf0=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220718172206-7cf1bc791bdc h1:zM32iRe7JPQVkzrQ/kRgJelmgJb5SST0w1S6Zxh70FA=
|
||||
github.com/siyuan-note/dejavu v0.0.0-20220718172206-7cf1bc791bdc/go.mod h1:0VEmTSMPoFer5yCQ4ozkjC0YX1rpK7BEJ0IwXI2cqf0=
|
||||
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-20220624162334-ca7c06dc771f h1:JMobMNZ7AqaKKyEK+WeWFhix/2TDQXgPZDajU00IybU=
|
||||
|
|
|
@ -643,19 +643,32 @@ func subscribeEvents() {
|
|||
contextPushMsg(context, msg)
|
||||
}
|
||||
})
|
||||
var bootProgressPart float64
|
||||
eventbus.Subscribe(dejavu.EvtCheckoutUpsertFiles, func(context map[string]interface{}, files []*entity.File) {
|
||||
msg := fmt.Sprintf(Conf.Language(162), len(files))
|
||||
util.SetBootDetails(msg)
|
||||
bootProgressPart = 10 / float64(len(files))
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtCheckoutUpsertFile, func(context map[string]interface{}, path string) {
|
||||
msg := fmt.Sprintf(Conf.Language(162), path)
|
||||
util.IncBootProgress(bootProgressPart, msg)
|
||||
count++
|
||||
if 0 == count%32 {
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
}
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtCheckoutRemoveFiles, func(context map[string]interface{}, files []*entity.File) {
|
||||
msg := fmt.Sprintf(Conf.Language(163), files)
|
||||
util.SetBootDetails(msg)
|
||||
bootProgressPart = 10 / float64(len(files))
|
||||
contextPushMsg(context, msg)
|
||||
})
|
||||
eventbus.Subscribe(dejavu.EvtCheckoutRemoveFile, func(context map[string]interface{}, path string) {
|
||||
msg := fmt.Sprintf(Conf.Language(163), path)
|
||||
util.IncBootProgress(bootProgressPart, msg)
|
||||
count++
|
||||
if 0 == count%32 {
|
||||
util.SetBootDetails(msg)
|
||||
contextPushMsg(context, msg)
|
||||
}
|
||||
})
|
||||
|
@ -666,7 +679,6 @@ func subscribeEvents() {
|
|||
contextPushMsg(context, msg)
|
||||
})
|
||||
|
||||
var bootProgressPart float64
|
||||
eventbus.Subscribe(dejavu.EvtCloudBeforeDownloadFiles, func(context map[string]interface{}, ids []string) {
|
||||
msg := fmt.Sprintf(Conf.Language(165), len(ids))
|
||||
util.SetBootDetails(msg)
|
||||
|
|
Loading…
Add table
Reference in a new issue