mirror of
https://github.com/Luzifer/continuous-spark.git
synced 2024-12-20 09:41:19 +00:00
Fix: Metrics sender blocked on errors
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
7b4bd40773
commit
d744b91fb0
1 changed files with 6 additions and 0 deletions
6
main.go
6
main.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue