mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🐛 Improve importing .sy.zip https://github.com/siyuan-note/siyuan/issues/12825
This commit is contained in:
parent
6c4a72b16e
commit
ac4b0526a4
2 changed files with 3 additions and 3 deletions
|
|
@ -25,7 +25,6 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/88250/lute"
|
"github.com/88250/lute"
|
||||||
"github.com/88250/lute/parse"
|
"github.com/88250/lute/parse"
|
||||||
|
|
@ -89,7 +88,7 @@ func batchLoadTrees(boxIDs, paths []string, luteEngine *lute.Lute) (ret []*parse
|
||||||
lock := sync.Mutex{}
|
lock := sync.Mutex{}
|
||||||
loaded := map[string]bool{}
|
loaded := map[string]bool{}
|
||||||
|
|
||||||
start := time.Now()
|
//start := time.Now()
|
||||||
p, _ := ants.NewPoolWithFunc(8, func(arg interface{}) {
|
p, _ := ants.NewPoolWithFunc(8, func(arg interface{}) {
|
||||||
defer waitGroup.Done()
|
defer waitGroup.Done()
|
||||||
|
|
||||||
|
|
@ -114,7 +113,7 @@ func batchLoadTrees(boxIDs, paths []string, luteEngine *lute.Lute) (ret []*parse
|
||||||
}
|
}
|
||||||
waitGroup.Wait()
|
waitGroup.Wait()
|
||||||
p.Release()
|
p.Release()
|
||||||
logging.LogInfof("batch load trees [%d] cost [%s]", len(paths), time.Since(start))
|
//logging.LogInfof("batch load trees [%d] cost [%s]", len(paths), time.Since(start))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -425,6 +425,7 @@ func RenderTemplateCol(ial map[string]string, rowValues []*av.KeyValues, tplCont
|
||||||
dataModel["created"] = created
|
dataModel["created"] = created
|
||||||
} else {
|
} else {
|
||||||
errMsg := parseErr.Error()
|
errMsg := parseErr.Error()
|
||||||
|
//logging.LogWarnf("parse created [%s] failed: %s", createdStr, errMsg)
|
||||||
if strings.Contains(errMsg, "minute out of range") {
|
if strings.Contains(errMsg, "minute out of range") {
|
||||||
// parsing time "20240709158553": minute out of range
|
// parsing time "20240709158553": minute out of range
|
||||||
// 将分秒部分置为 0000
|
// 将分秒部分置为 0000
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue