🎨 改进内核任务调度机制提升稳定性 https://github.com/siyuan-note/siyuan/issues/7113

This commit is contained in:
Liang Ding 2023-01-23 11:20:05 +08:00
parent 6141be700a
commit 6ed1c5dc1c
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
12 changed files with 11 additions and 184 deletions

View file

@ -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 {