InfluxDB: don't limit the amount of data written

This commit is contained in:
andig 2021-10-24 16:25:19 +02:00
parent 3581644004
commit 40ddbab8cc

View file

@ -107,12 +107,13 @@ func configureDatabase(conf server.InfluxConfig, loadPoints []loadpoint.API, in
)
// eliminate duplicate values
dedupe := pipe.NewDeduplicator(30*time.Minute, "vehicleSoC", "vehicleRange", "vehicleOdometer")
dedupe := pipe.NewDeduplicator(30*time.Minute, "vehicleCapacity", "vehicleSoC", "vehicleRange", "vehicleOdometer", "chargedEnergy", "chargeRemainingEnergy")
in = dedupe.Pipe(in)
// reduce number of values written to influx
limiter := pipe.NewLimiter(5 * time.Second)
in = limiter.Pipe(in)
// TODO this breaks writing vehicleRange as its re-writting in short interval
// limiter := pipe.NewLimiter(5 * time.Second)
// in = limiter.Pipe(in)
go influx.Run(loadPoints, in)
}