mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
Merge pull request #1133 from c9s/fix/batch-query/end-if-start-greater-than-end
FIX: end batch query if start > end
This commit is contained in:
commit
6d8b3d7f5b
|
@ -72,16 +72,11 @@ func (q *AsyncTimeRangedBatchQuery) Query(ctx context.Context, ch interface{}, s
|
|||
|
||||
if listLen == 0 {
|
||||
if q.JumpIfEmpty > 0 {
|
||||
startTime2 := startTime.Add(q.JumpIfEmpty)
|
||||
if startTime2.After(endTime) {
|
||||
startTime = endTime
|
||||
endTime = startTime2
|
||||
} else {
|
||||
startTime = startTime.Add(q.JumpIfEmpty)
|
||||
startTime = startTime.Add(q.JumpIfEmpty)
|
||||
if startTime.Before(endTime) {
|
||||
log.Debugf("batch querying %T: empty records jump to %s", q.Type, startTime)
|
||||
continue
|
||||
}
|
||||
|
||||
log.Debugf("batch querying %T: empty records jump to %s", q.Type, startTime)
|
||||
continue
|
||||
}
|
||||
|
||||
log.Debugf("batch querying %T: empty records, query is completed", q.Type)
|
||||
|
|
Loading…
Reference in New Issue
Block a user