mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
db777afc25
commit
5aff312a7b
3 changed files with 64 additions and 54 deletions
|
|
@ -92,17 +92,3 @@ func UpdateBlockContent(block *Block) {
|
|||
tx.Commit()
|
||||
putBlockCache(block)
|
||||
}
|
||||
|
||||
func DeleteTree(table, rootID string) {
|
||||
tx, err := beginTx()
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
stmt := "DELETE FROM `" + table + "` WHERE root_id = ?"
|
||||
if err = execStmtTx(tx, stmt, rootID); nil != err {
|
||||
tx.Rollback()
|
||||
return
|
||||
}
|
||||
tx.Commit()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -597,8 +597,8 @@ func GetBlock(id string) (ret *Block) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetRootUpdated(blocksTable string) (ret map[string]string, err error) {
|
||||
rows, err := query("SELECT root_id, updated FROM `" + blocksTable + "` WHERE type = 'd'")
|
||||
func GetRootUpdated() (ret map[string]string, err error) {
|
||||
rows, err := query("SELECT root_id, updated FROM `blocks` WHERE type = 'd'")
|
||||
if nil != err {
|
||||
logging.LogErrorf("sql query failed: %s", err)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue