1
0
Fork 0
mirror of https://github.com/Luzifer/continuous-spark.git synced 2024-10-18 04:44:24 +00:00

Fix: Metrics sender blocked on errors

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-01-10 15:56:58 +01:00
parent 7b4bd40773
commit d744b91fb0
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -56,6 +56,12 @@ func main() {
if metrics, err = newMetricsSender(cfg.InfluxHost, cfg.InfluxUser, cfg.InfluxPass, cfg.InfluxDB); err != nil {
log.WithError(err).Fatalf("Unable to initialize InfluxDB sender")
}
go func() {
for err := range metrics.Errors() {
log.WithError(err).Error("Unable to transmit metrics")
}
}()
}
if err := updateStats(execTest()); err != nil {