mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113
This commit is contained in:
parent
6141be700a
commit
6ed1c5dc1c
12 changed files with 11 additions and 184 deletions
|
|
@ -54,27 +54,6 @@ func setDatabaseVer() {
|
|||
CommitTx(tx)
|
||||
}
|
||||
|
||||
func ClearBoxHash(tx *sql.Tx) {
|
||||
stmt := "DELETE FROM stat WHERE `key` LIKE '%_hash'"
|
||||
execStmtTx(tx, stmt)
|
||||
}
|
||||
|
||||
func RemoveBoxHash(tx *sql.Tx, box string) {
|
||||
key := box + "_hash"
|
||||
stmt := "DELETE FROM stat WHERE `key` = '" + key + "'"
|
||||
execStmtTx(tx, stmt)
|
||||
}
|
||||
|
||||
func PutBoxHash(tx *sql.Tx, box, hash string) {
|
||||
key := box + "_hash"
|
||||
putStat(tx, key, hash)
|
||||
}
|
||||
|
||||
func GetBoxHash(box string) string {
|
||||
key := box + "_hash"
|
||||
return getStat(key)
|
||||
}
|
||||
|
||||
func putStat(tx *sql.Tx, key, value string) (err error) {
|
||||
stmt := "DELETE FROM stat WHERE `key` = '" + key + "'"
|
||||
if err = execStmtTx(tx, stmt); nil != err {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue