Skip to content

Commit

Permalink
Batch points, emit server errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
kostko committed Jun 22, 2017
1 parent 0808692 commit 86c8363
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions datastream/backends/influxdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,9 +1277,12 @@ def _append_multiple(self, datapoints, raw=False):

if points:
try:
self._influxdb.write_points(points)
except influxdb.exceptions.InfluxDBServerError:
raise exceptions.StreamAppendFailed
self._influxdb.write_points(
points=points,
batch_size=1000,
)
except influxdb.exceptions.InfluxDBServerError as error:
raise exceptions.StreamAppendFailed(error.content)

self._backprocess_streams(stream_ids, grouped_datapoints)

Expand Down

0 comments on commit 86c8363

Please sign in to comment.