mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-08 00:04:21 +01:00
🎨 Improve init db
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
297e536a09
commit
42e1c0be4d
1 changed files with 3 additions and 0 deletions
|
|
@ -95,6 +95,9 @@ func ClearQueue() {
|
|||
var flushingTx = atomic.Bool{}
|
||||
|
||||
func FlushQueue() {
|
||||
initDatabaseLock.Lock()
|
||||
defer initDatabaseLock.Unlock()
|
||||
|
||||
ops := getOperations()
|
||||
total := len(ops)
|
||||
if 1 > total && !flushingTx.Load() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue