fix influxdb output worker func
@@ -194,6 +194,7 @@ func (i *InfluxDBOutput) health(ctx context.Context) {
}
func (i *InfluxDBOutput) worker(ctx context.Context, idx int) {
+ for {
select {
case <-ctx.Done():
i.logger.Printf("worker-%d terminating...", idx)
@@ -202,3 +203,4 @@ func (i *InfluxDBOutput) worker(ctx context.Context, idx int) {
i.writer.WritePoint(influxdb2.NewPoint(ev.Name, ev.Tags, ev.Values, time.Unix(0, ev.Timestamp)))
}
}
+}
