This commit is contained in:
aozhiwei 2024-11-17 13:07:34 +08:00
parent b8ccbdd770
commit eeffcd5df3

View File

@ -35,6 +35,9 @@ func (this *log) saveToDb() {
this.loopCond.L.Lock() this.loopCond.L.Lock()
this.loopCond.Wait() this.loopCond.Wait()
this.loopCond.L.Unlock() this.loopCond.L.Unlock()
} else {
this.logQueue.WorkList.ForEach(this.saveNode)
this.logQueue.WorkList.Init(nil)
} }
} }
} }
@ -51,3 +54,7 @@ func (this *log) AddAsyncLog(accountId string, logType string, subLogType string
this.logQueue.Push(&node.entry) this.logQueue.Push(&node.entry)
this.loopCond.Broadcast() this.loopCond.Broadcast()
} }
func (this *log) saveNode(node interface{}) bool {
return true
}