mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 OCR no longer blocks document loading https://github.com/siyuan-note/siyuan/issues/9230
This commit is contained in:
parent
1dc5a371f6
commit
aaf15c77e0
4 changed files with 25 additions and 7 deletions
|
|
@ -12,6 +12,7 @@ import (
|
|||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/cache"
|
||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||
"github.com/siyuan-note/siyuan/kernel/task"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
|
@ -53,6 +54,14 @@ func autoOCRAssets() {
|
|||
}
|
||||
|
||||
cleanNotExistAssetsTexts()
|
||||
|
||||
// 刷新 OCR 结果到数据库
|
||||
util.NodeOCRQueueLock.Lock()
|
||||
defer util.NodeOCRQueueLock.Unlock()
|
||||
for _, id := range util.NodeOCRQueue {
|
||||
sql.IndexNodeQueue(id)
|
||||
}
|
||||
util.NodeOCRQueue = nil
|
||||
}
|
||||
|
||||
func cleanNotExistAssetsTexts() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue