diff --git a/consumer/influx_stat.go b/consumer/influx_stat.go index 0e08dba..5b33c85 100644 --- a/consumer/influx_stat.go +++ b/consumer/influx_stat.go @@ -91,13 +91,13 @@ func (m *influxMetric) StartLogging() { case <-ticker: break checker case changedSpeed := <-m.fanSpeedConsumer: - if point, err := m.getFanspeedPoint(changedSpeed); err != nil { + if point, err := m.getFanspeedPoint(changedSpeed); err == nil { pointList = append(pointList, point) } else { influxLogger.Debugf("id %d speed err %s", changedSpeed.Id, err) } case changedTempeture := <-m.tempetureConsumer: - if point, err := m.getTempeturePoint(changedTempeture); err != nil { + if point, err := m.getTempeturePoint(changedTempeture); err == nil { pointList = append(pointList, point) } else { influxLogger.Debugf("id %d tempeture err %s", changedTempeture.Id, err)