mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
3c79a226be
commit
f8ef5639c0
12 changed files with 40 additions and 29 deletions
|
|
@ -34,6 +34,7 @@ import (
|
|||
"github.com/88250/lute/parse"
|
||||
"github.com/mattn/go-sqlite3"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/siyuan-note/eventbus"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
|
|
@ -947,7 +948,7 @@ func deleteFileAnnotationRefsByBoxTx(tx *sql.Tx, box string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func deleteByRootID(tx *sql.Tx, rootID string) (err error) {
|
||||
func deleteByRootID(tx *sql.Tx, rootID string, context map[string]interface{}) (err error) {
|
||||
stmt := "DELETE FROM blocks WHERE root_id = ?"
|
||||
if err = execStmtTx(tx, stmt, rootID); nil != err {
|
||||
return
|
||||
|
|
@ -969,6 +970,7 @@ func deleteByRootID(tx *sql.Tx, rootID string) (err error) {
|
|||
return
|
||||
}
|
||||
ClearBlockCache()
|
||||
eventbus.Publish(eventbus.EvtSQLDeleteBlocks, context, rootID)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue