1
This commit is contained in:
parent
693a5ab7b0
commit
cc296565ec
12
dbpool.go
12
dbpool.go
@ -130,11 +130,23 @@ func (this *dbPool) SyncBatchLoadFullTable(dataSource string, sqlTpl string,
|
||||
|
||||
func (this *dbPool) LoopLoad(
|
||||
dataSource string,
|
||||
watchTable string,
|
||||
watchTimeCb func() int64,
|
||||
sqlCb func(int64) string,
|
||||
params []string,
|
||||
nextTimeCb func() time.Duration,
|
||||
nextRoundCb func() time.Duration,
|
||||
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
|
||||
for true {
|
||||
hasNextData := false
|
||||
|
Loading…
x
Reference in New Issue
Block a user