This commit is contained in:
aozhiwei 2024-06-26 17:18:19 +08:00
parent 693a5ab7b0
commit cc296565ec

View File

@ -130,11 +130,23 @@ func (this *dbPool) SyncBatchLoadFullTable(dataSource string, sqlTpl string,
func (this *dbPool) LoopLoad( func (this *dbPool) LoopLoad(
dataSource string, dataSource string,
watchTable string,
watchTimeCb func() int64,
sqlCb func(int64) string, sqlCb func(int64) string,
params []string, params []string,
nextTimeCb func() time.Duration, nextTimeCb func() time.Duration,
nextRoundCb func() time.Duration, nextRoundCb func() time.Duration,
doCb func(*DataSet) bool) { doCb func(*DataSet) bool) {
{
go func () {
this.RawQuery(
dataSource,
fmt.Sprintf("SELECT MAX(idx) FROM %s", watchTable),
params,
func (err error, ds *DataSet) {
})
}()
}
var lastIdx int64 var lastIdx int64
for true { for true {
hasNextData := false hasNextData := false