mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🎨 数据库事务队列执行报错回滚释放连接
This commit is contained in:
parent
4041af465b
commit
209a853040
1 changed files with 1 additions and 0 deletions
|
|
@ -118,6 +118,7 @@ func FlushQueue() {
|
||||||
context["current"] = i
|
context["current"] = i
|
||||||
context["total"] = total
|
context["total"] = total
|
||||||
if err = execOp(op, tx, context); nil != err {
|
if err = execOp(op, tx, context); nil != err {
|
||||||
|
tx.Rollback()
|
||||||
logging.LogErrorf("queue operation failed: %s", err)
|
logging.LogErrorf("queue operation failed: %s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue