empty metrics data sets are not an error (#280)

This commit is contained in:
Michael Quigley
2023-03-28 15:06:19 -04:00
committed by Kenneth Bingham
parent 3c672df588
commit 4bdcc3b4c8

View File

@@ -81,7 +81,7 @@ func (r *influxReader) runQueryForRxTx(query string) (rx int64, tx int64, err er
}
count++
}
if count != 2 {
if count != 0 && count != 2 {
return -1, -1, errors.Errorf("expected 2 results; got '%d' (%v)", count, strings.ReplaceAll(query, "\n", ""))
}
return rx, tx, nil