Merge "Allow persister to handle retention policies in influx"

This commit is contained in:
Zuul 2018-01-09 23:53:04 +00:00 committed by Gerrit Code Review
commit c923911cb5
1 changed files with 7 additions and 4 deletions

View File

@ -56,10 +56,13 @@ class Persister(object):
self._data_points = []
self._consumer.commit()
except Exception:
LOG.exception("Error writing to database: {}"
.format(self._data_points))
raise
except Exception as ex:
if ex.message.startswith("400: partial write: points beyond retention policy dropped"):
LOG.info("Some points older than retention policy were dropped")
else:
LOG.exception("Error writing to database: {}"
.format(self._data_points))
raise ex
def run(self):
try: