diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bf6290d..975ff557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Consolidate lesson definition logic, and provide local validation tool (syrctl) [#30](https://github.com/nre-learning/syringe/pull/30) - Redesign and fix the way iframe resources are created and presented to the API[#32](https://github.com/nre-learning/syringe/pull/32) +- Keep trying to serve metrics after an influxdb connection failure, instead of returning immediately [#35](https://github.com/nre-learning/syringe/pull/35) - Migrate to `dep` for dependency management [#36](https://github.com/nre-learning/syringe/pull/36) ## 0.1.3 - November 15, 2018 diff --git a/api/exp/influxdb.go b/api/exp/influxdb.go index 23e60e04..08a41c30 100644 --- a/api/exp/influxdb.go +++ b/api/exp/influxdb.go @@ -112,7 +112,7 @@ func (s *server) startTSDBExport() error { }) if err != nil { log.Error("Couldn't connect to Influxdb: ", err) - return err + continue } for lessonId, _ := range s.scheduler.LessonDefs { @@ -135,7 +135,7 @@ func (s *server) startTSDBExport() error { pt, err := influx.NewPoint("sessionStatus", tags, fields, time.Now()) if err != nil { log.Error("Error creating InfluxDB Point: ", err) - return err + continue } bp.AddPoint(pt) @@ -146,7 +146,7 @@ func (s *server) startTSDBExport() error { err = c.Write(bp) if err != nil { log.Error("Error writing InfluxDB Batch Points: ", err) - return err + continue } log.Debugf("Wrote session data to influxdb: %v", bp)