Allow persister to handle retention policies in influx

Change-Id: I99f3bc265f347c805fc13cad5e857f70f791851a
This commit is contained in:
ryan-brandt 2017-10-03 11:14:45 -06:00
parent ca5d223611
commit 3dde66dd33
1 changed files with 7 additions and 4 deletions

View File

@ -55,10 +55,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: