mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 Automatic check of database indexes is only performed once after startup https://github.com/siyuan-note/siyuan/issues/10563
This commit is contained in:
parent
9989d79060
commit
aeb09cb0f6
4 changed files with 4 additions and 3 deletions
|
|
@ -38,7 +38,6 @@ func StartCron() {
|
||||||
go every(util.SQLFlushInterval, sql.FlushTxJob)
|
go every(util.SQLFlushInterval, sql.FlushTxJob)
|
||||||
go every(util.SQLFlushInterval, sql.FlushHistoryTxJob)
|
go every(util.SQLFlushInterval, sql.FlushHistoryTxJob)
|
||||||
go every(util.SQLFlushInterval, sql.FlushAssetContentTxJob)
|
go every(util.SQLFlushInterval, sql.FlushAssetContentTxJob)
|
||||||
go every(10*time.Minute, model.FixIndexJob)
|
|
||||||
go every(10*time.Minute, model.IndexEmbedBlockJob)
|
go every(10*time.Minute, model.IndexEmbedBlockJob)
|
||||||
go every(10*time.Minute, model.CacheVirtualBlockRefJob)
|
go every(10*time.Minute, model.CacheVirtualBlockRefJob)
|
||||||
go every(30*time.Second, model.OCRAssetsJob)
|
go every(30*time.Second, model.OCRAssetsJob)
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ func main() {
|
||||||
util.PushClearAllMsg()
|
util.PushClearAllMsg()
|
||||||
|
|
||||||
job.StartCron()
|
job.StartCron()
|
||||||
|
go model.CheckIndex()
|
||||||
go model.AutoGenerateDocHistory()
|
go model.AutoGenerateDocHistory()
|
||||||
go cache.LoadAssets()
|
go cache.LoadAssets()
|
||||||
go util.CheckFileSysStatus()
|
go util.CheckFileSysStatus()
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ func StartKernel(container, appDir, workspaceBaseDir, timezoneID, localIPs, lang
|
||||||
util.PushClearAllMsg()
|
util.PushClearAllMsg()
|
||||||
|
|
||||||
job.StartCron()
|
job.StartCron()
|
||||||
|
go model.CheckIndex()
|
||||||
go model.AutoGenerateDocHistory()
|
go model.AutoGenerateDocHistory()
|
||||||
go cache.LoadAssets()
|
go cache.LoadAssets()
|
||||||
}()
|
}()
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ import (
|
||||||
"github.com/siyuan-note/siyuan/kernel/util"
|
"github.com/siyuan-note/siyuan/kernel/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FixIndexJob 自动校验数据库索引 https://github.com/siyuan-note/siyuan/issues/7016
|
// CheckIndex 自动校验数据库索引 https://github.com/siyuan-note/siyuan/issues/7016 https://github.com/siyuan-note/siyuan/issues/10563
|
||||||
func FixIndexJob() {
|
func CheckIndex() {
|
||||||
task.AppendTask(task.DatabaseIndexFix, removeDuplicateDatabaseIndex)
|
task.AppendTask(task.DatabaseIndexFix, removeDuplicateDatabaseIndex)
|
||||||
sql.WaitForWritingDatabase()
|
sql.WaitForWritingDatabase()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue