🐛 修复 macOS 端构建报错
This commit is contained in:
parent
313181ef48
commit
c585ca972f
3 changed files with 6 additions and 9 deletions
|
@ -78,10 +78,7 @@ func NewCommand(cmdStr string, cmdId float64, param map[string]interface{}, sess
|
|||
|
||||
func Exec(cmd Cmd) {
|
||||
go func() {
|
||||
//start := time.Now()
|
||||
defer logging.Recover()
|
||||
cmd.Exec()
|
||||
//end := time.Now()
|
||||
//util.Logger.Infof("cmd [%s] exec consumed [%d]ms", cmd.Name(), end.Sub(start).Milliseconds())
|
||||
}()
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/radovskyb/watcher"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/cache"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
@ -51,7 +52,7 @@ func watchAssets() {
|
|||
return
|
||||
}
|
||||
|
||||
//util.LogInfof("assets changed: %s", event)
|
||||
//logging.LogInfof("assets changed: %s", event)
|
||||
if watcher.Write == event.Op {
|
||||
IncSync()
|
||||
}
|
||||
|
@ -62,7 +63,7 @@ func watchAssets() {
|
|||
if !ok {
|
||||
return
|
||||
}
|
||||
util.LogErrorf("watch assets failed: %s", err)
|
||||
logging.LogErrorf("watch assets failed: %s", err)
|
||||
case <-assetsWatcher.Closed:
|
||||
return
|
||||
}
|
||||
|
@ -70,13 +71,13 @@ func watchAssets() {
|
|||
}()
|
||||
|
||||
if err := assetsWatcher.Add(assetsDir); nil != err {
|
||||
util.LogErrorf("add assets watcher for folder [%s] failed: %s", assetsDir, err)
|
||||
logging.LogErrorf("add assets watcher for folder [%s] failed: %s", assetsDir, err)
|
||||
return
|
||||
}
|
||||
|
||||
//util.LogInfof("added file watcher [%s]", assetsDir)
|
||||
//logging.LogInfof("added file watcher [%s]", assetsDir)
|
||||
if err := assetsWatcher.Start(10 * time.Second); nil != err {
|
||||
util.LogErrorf("start assets watcher for folder [%s] failed: %s", assetsDir, err)
|
||||
logging.LogErrorf("start assets watcher for folder [%s] failed: %s", assetsDir, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,7 +164,6 @@ func BuildGraph(query string) (boxID string, nodes []*GraphNode, links []*GraphL
|
|||
// 文档块关联
|
||||
rootBlock := getBlockIn(treeBlocks, root.ID)
|
||||
if nil == rootBlock {
|
||||
//util.LogWarnf("root block is nil [rootID=%s], tree blocks [len=%d], just skip it", root.ID, len(treeBlocks))
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue