mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 10:30:13 +01:00
This commit is contained in:
parent
2cb6e82330
commit
ffed021dda
3 changed files with 8 additions and 4 deletions
|
|
@ -57,7 +57,7 @@ func autoOCRAssets() {
|
|||
waitGroup.Add(1)
|
||||
p.Invoke(assetAbsPath)
|
||||
|
||||
if 63 <= i { // 一次最多处理 64 张图片,防止卡顿
|
||||
if 63 <= i { // 一次任务中最多处理 64 张图片,防止卡顿
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1225,8 +1225,8 @@ func AutoIndexEmbedBlock() {
|
|||
}
|
||||
|
||||
func autoIndexEmbedBlock() {
|
||||
embedBlocks := sql.QueryEmbedBlocks()
|
||||
for _, embedBlock := range embedBlocks {
|
||||
embedBlocks := sql.QueryEmptyContentEmbedBlocks()
|
||||
for i, embedBlock := range embedBlocks {
|
||||
stmt := strings.TrimPrefix(embedBlock.Markdown, "{{")
|
||||
stmt = strings.TrimSuffix(stmt, "}}")
|
||||
blocks := sql.SelectBlocksRawStmtNoParse(stmt, 102400)
|
||||
|
|
@ -1234,6 +1234,10 @@ func autoIndexEmbedBlock() {
|
|||
embedBlock.Content = block.Content
|
||||
sql.UpdateBlockContent(embedBlock)
|
||||
}
|
||||
|
||||
if 63 <= i { // 一次任务中最多处理 64 个嵌入块,防止卡顿
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue