🎨 Improve init db

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-02-01 21:11:20 +08:00
parent 297e536a09
commit 42e1c0be4d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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() {