This commit is contained in:
aozhiwei 2024-06-29 19:59:16 +08:00
parent 0de6e748f6
commit 83692803ab

View File

@ -163,6 +163,7 @@ func (this *dbPool) LoopLoad(
if idx > lastMaxIdx {
lastMaxIdx = idx
hasNewDdata = true
GetSysLog().Info("%s hasNewData max_idx:%d", watchTable, lastMaxIdx)
}
}
})
@ -174,6 +175,21 @@ func (this *dbPool) LoopLoad(
}
}()
go func () {
var waitSecond int64 = 10
for {
select {
case waitSecond = <-chTimer:
if waitSecond < 10 {
waitSecond = 10
}
case <-time.After(time.Second * time.Duration(waitSecond)):
waitSecond = 10
newDataCond.Broadcast()
}
}
}()
{
var lastIdx int64
for true {