fix issues brought up by joe

pull/8896/head
Lyon Hill 2017-10-02 11:41:03 -06:00
parent 38dc837910
commit a6cbce0d3e
1 changed files with 5 additions and 1 deletions

View File

@ -56,13 +56,17 @@ func (b *PointBatcher) Start() {
}
// initialize the timer variable
timer := &time.NewTimer(b.duration)
timer := time.NewTimer(time.Hour)
timer.Stop()
var batch []models.Point
emit := func() {
timer.Stop()
select {
case <-timer.C:
default:
}
// Nothing batched?
if len(batch) == 0 {